return di->gotplt_present ? di->gotplt_size : 0;
}
+Addr VG_(DebugInfo_get_got_avma)(const DebugInfo* di)
+{
+ return di->got_present ? di->got_avma : 0;
+}
+
+SizeT VG_(DebugInfo_get_got_size)(const DebugInfo* di)
+{
+ return di->got_present ? di->got_size : 0;
+}
+
const UChar* VG_(DebugInfo_get_soname)(const DebugInfo* di)
{
return di->soname;
static const Bool trace_sectsuppr = False;
/**
- * Suppress data race reports on all addresses contained in .plt and
+ * Suppress data race reports on all addresses contained in .plt, .got and
* .got.plt sections inside the address range [ a, a + len [. The data in
* these sections is modified by _dl_relocate_object() every time a function
* in a shared library is called for the first time. Since the first call
* such calls can cause conflicting accesses. See also Ulrich Drepper's
* paper "How to Write Shared Libraries" for more information about relocation
* (http://people.redhat.com/drepper/dsohowto.pdf).
+ * Note: the contents of the .got section is only modified by the MIPS resolver.
*/
static void DRD_(suppress_relocation_conflicts)(const Addr a, const SizeT len)
{
tl_assert(VG_(DebugInfo_sect_kind)(NULL, 0, avma) == Vg_SectGOTPLT);
DRD_(start_suppression)(avma, avma + size, ".gotplt");
}
+
+ avma = VG_(DebugInfo_get_got_avma)(di);
+ size = VG_(DebugInfo_get_got_size)(di);
+ tl_assert((avma && size) || (avma == 0 && size == 0));
+ if (size > 0) {
+ if (trace_sectsuppr)
+ VG_(dmsg)("Suppressing .got @ 0x%lx size %ld\n", avma, size);
+ tl_assert(VG_(DebugInfo_sect_kind)(NULL, 0, avma) == Vg_SectGOT);
+ DRD_(start_suppression)(avma, avma + size, ".got");
+ }
}
}
SizeT VG_(DebugInfo_get_plt_size) ( const DebugInfo *di );
Addr VG_(DebugInfo_get_gotplt_avma) ( const DebugInfo *di );
SizeT VG_(DebugInfo_get_gotplt_size) ( const DebugInfo *di );
+Addr VG_(DebugInfo_get_got_avma) ( const DebugInfo *di );
+SizeT VG_(DebugInfo_get_got_size) ( const DebugInfo *di );
const UChar* VG_(DebugInfo_get_soname) ( const DebugInfo *di );
const UChar* VG_(DebugInfo_get_filename) ( const DebugInfo *di );
PtrdiffT VG_(DebugInfo_get_text_bias) ( const DebugInfo *di );