|
[Valgrind-developers] valgrind: r8110 - in
branches/CROSS_COMPILATION: coregrind/m_debuginfo include
From: <sv...@va...> - 2008-05-20 12:33:18
|
Author: bart
Date: 2008-05-20 13:33:16 +0100 (Tue, 20 May 2008)
New Revision: 8110
Log:
Added support for ELF .got.plt sections.
Modified:
branches/CROSS_COMPILATION/coregrind/m_debuginfo/debuginfo.c
branches/CROSS_COMPILATION/coregrind/m_debuginfo/priv_storage.h
branches/CROSS_COMPILATION/coregrind/m_debuginfo/readelf.c
branches/CROSS_COMPILATION/include/pub_tool_debuginfo.h
Modified: branches/CROSS_COMPILATION/coregrind/m_debuginfo/debuginfo.c
===================================================================
--- branches/CROSS_COMPILATION/coregrind/m_debuginfo/debuginfo.c 2008-05-20 11:11:37 UTC (rev 8109)
+++ branches/CROSS_COMPILATION/coregrind/m_debuginfo/debuginfo.c 2008-05-20 12:33:16 UTC (rev 8110)
@@ -2201,6 +2201,16 @@
return di->plt_present ? di->plt_size : 0;
}
+Addr VG_(seginfo_get_gotplt_avma)(const DebugInfo* di)
+{
+ return di->gotplt_present ? di->gotplt_avma : 0;
+}
+
+SizeT VG_(seginfo_get_gotplt_size)(const DebugInfo* di)
+{
+ return di->gotplt_present ? di->gotplt_size : 0;
+}
+
const UChar* VG_(seginfo_soname)(const DebugInfo* di)
{
return di->soname;
Modified: branches/CROSS_COMPILATION/coregrind/m_debuginfo/priv_storage.h
===================================================================
--- branches/CROSS_COMPILATION/coregrind/m_debuginfo/priv_storage.h 2008-05-20 11:11:37 UTC (rev 8109)
+++ branches/CROSS_COMPILATION/coregrind/m_debuginfo/priv_storage.h 2008-05-20 12:33:16 UTC (rev 8110)
@@ -331,6 +331,10 @@
Bool got_present;
Addr got_avma;
SizeT got_size;
+ /* .got.plt */
+ Bool gotplt_present;
+ Addr gotplt_avma;
+ SizeT gotplt_size;
/* .opd -- needed on ppc64-linux for finding symbols */
Bool opd_present;
Addr opd_avma;
Modified: branches/CROSS_COMPILATION/coregrind/m_debuginfo/readelf.c
===================================================================
--- branches/CROSS_COMPILATION/coregrind/m_debuginfo/readelf.c 2008-05-20 11:11:37 UTC (rev 8109)
+++ branches/CROSS_COMPILATION/coregrind/m_debuginfo/readelf.c 2008-05-20 12:33:16 UTC (rev 8110)
@@ -1468,6 +1468,18 @@
}
}
+ /* Accept .got.plt where mapped as rw (data) */
+ if (0 == VG_(strcmp)(name, ".got.plt")) {
+ if (inrw && size > 0 && !di->gotplt_present) {
+ di->gotplt_present = True;
+ di->gotplt_avma = di->rw_map_avma + foff - di->rw_map_foff;
+ di->gotplt_size = size;
+ TRACE_SYMTAB("acquiring .got.plt avma = %p\n", di->gotplt_avma);
+ } else {
+ BAD(".got.plt");
+ }
+ }
+
/* PLT is different on different platforms, it seems. */
# if defined(VGP_x86_linux) || defined(VGP_amd64_linux)
/* Accept .plt where mapped as rx (code) */
Modified: branches/CROSS_COMPILATION/include/pub_tool_debuginfo.h
===================================================================
--- branches/CROSS_COMPILATION/include/pub_tool_debuginfo.h 2008-05-20 11:11:37 UTC (rev 8109)
+++ branches/CROSS_COMPILATION/include/pub_tool_debuginfo.h 2008-05-20 12:33:16 UTC (rev 8110)
@@ -122,6 +122,8 @@
extern ULong VG_(seginfo_get_text_bias)( const DebugInfo *di );
extern Addr VG_(seginfo_get_plt_avma) ( const DebugInfo *di );
extern SizeT VG_(seginfo_get_plt_size) ( const DebugInfo *di );
+extern Addr VG_(seginfo_get_gotplt_avma)( const DebugInfo *di );
+extern SizeT VG_(seginfo_get_gotplt_size)( const DebugInfo *di );
extern const UChar* VG_(seginfo_soname) ( const DebugInfo *di );
extern const UChar* VG_(seginfo_filename) ( const DebugInfo *di );
|
|
From: Nicholas N. <nj...@cs...> - 2008-05-20 22:04:08
|
On Tue, 20 May 2008 sv...@va... wrote: > Author: bart > Date: 2008-05-20 13:33:16 +0100 (Tue, 20 May 2008) > New Revision: 8110 > > Log: > Added support for ELF .got.plt sections. > > Modified: > branches/CROSS_COMPILATION/coregrind/m_debuginfo/debuginfo.c > branches/CROSS_COMPILATION/coregrind/m_debuginfo/priv_storage.h > branches/CROSS_COMPILATION/coregrind/m_debuginfo/readelf.c > branches/CROSS_COMPILATION/include/pub_tool_debuginfo.h Is this related to cross-compilation? Nick |
|
From: Bart V. A. <bar...@gm...> - 2008-05-21 06:16:22
|
On Wed, May 21, 2008 at 12:04 AM, Nicholas Nethercote <nj...@cs...> wrote: > On Tue, 20 May 2008 sv...@va... wrote: >> Author: bart >> Log: >> Added support for ELF .got.plt sections. > > Is this related to cross-compilation? The CROSS_COMPILATION branch contains not only the changes for making it possible to cross-compile Valgrind, but also the changes necessary to get exp-drd working on PPC. The configure.in changes and the VEX patch are sufficient to enable cross-compilation. Bart. |