|
From: <sv...@va...> - 2008-04-13 19:37:56
|
Author: sewardj
Date: 2008-04-13 20:38:00 +0100 (Sun, 13 Apr 2008)
New Revision: 7868
Log:
Merge (from branches/HGDEV) r7795: (Ignore .bss symbols in the case
where an ELF object's .bss is mapped r-x only)
Modified:
branches/OTRACK_BY_INSTRUMENTATION/coregrind/m_debuginfo/readelf.c
Modified: branches/OTRACK_BY_INSTRUMENTATION/coregrind/m_debuginfo/readelf.c
===================================================================
--- branches/OTRACK_BY_INSTRUMENTATION/coregrind/m_debuginfo/readelf.c 2008-04-13 17:35:08 UTC (rev 7867)
+++ branches/OTRACK_BY_INSTRUMENTATION/coregrind/m_debuginfo/readelf.c 2008-04-13 19:38:00 UTC (rev 7868)
@@ -1393,6 +1393,27 @@
di->bss_avma + di->bss_size - 1);
TRACE_SYMTAB("acquiring .bss bias = %p\n", di->bss_bias);
} else
+
+ /* Now one from the wtf?! department ... */
+ if (inrx && (!inrw) && size >= 0 && !di->bss_present) {
+ /* File contains a .bss, but it got mapped as rx only.
+ This is very strange. For now, just pretend we didn't
+ see it :-) */
+ di->bss_present = False;
+ di->bss_svma = 0;
+ di->bss_avma = 0;
+ di->bss_size = 0;
+ di->bss_bias = 0;
+ bss_align = 0;
+ if (!VG_(clo_xml)) {
+ VG_(message)(Vg_UserMsg, "Warning: the following file's .bss is "
+ "mapped r-x only - ignoring .bss syms");
+ VG_(message)(Vg_UserMsg, " %s", di->filename
+ ? di->filename
+ : (UChar*)"(null?!)" );
+ }
+ } else
+
if ((!inrw) && (!inrx) && size > 0 && !di->bss_present) {
/* File contains a .bss, but it didn't get mapped. Ignore. */
di->bss_present = False;
|