]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Bug 478837 - valgrind fails to read debug info for rust binaries
authorPaul Floyd <pjfloyd@wanadoo.fr>
Fri, 22 Dec 2023 18:59:56 +0000 (19:59 +0100)
committerPaul Floyd <pjfloyd@wanadoo.fr>
Fri, 22 Dec 2023 18:59:56 +0000 (19:59 +0100)
mold produces binaries with non-contiguous .rodata and .rodata.xxx
sections. The code that merges their addresses can only handle 1
rodata which means only contiguous sections can be merged.

Since this now seems to be a "normal" case I've changed the warning
message to be a SYMTAB_TRACE message.

NEWS
coregrind/m_debuginfo/readelf.c

diff --git a/NEWS b/NEWS
index 839407479f54473c79dfcab164f8d9e3d8ab8bc4..34ad143b5bbd133d05340465c6c747bf3ff31679 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -49,6 +49,7 @@ are not entered into bugzilla tend to get forgotten about or ignored.
 478211  Redundant code for vgdb.c and Valgrind core tools
 478624  Valgrind incompatibility with binutils-2.42 on x86 with new nop patterns
         (unhandled instruction bytes: 0x2E 0x8D 0xB4 0x26
+478837  valgrind fails to read debug info for rust binaries
 n-i-bz  Add redirect for memccpy
 
 To see details of a given bug, visit
index 418ee8627c6f3350fc562f003b6dd1087bcdb896..db523230b76188a9760d51e2502f600ad924a6dd 100644 (file)
@@ -2490,7 +2490,11 @@ Bool ML_(read_elf_object) ( struct _DebugInfo* di )
             if (svma == tmp) { /* adjacent to previous .rodata* */
                di->rodata_size = size + tmp - di->rodata_svma;
             } else {
-               BAD(".rodata"); /* is OK, but we cannot handle multiple .rodata* */
+                /* is OK, but we cannot handle multiple .rodata* */
+               TRACE_SYMTAB("%s section avma = %#lx .. %#lx is not contiguous, not merged\n",
+                            name,
+                            di->rodata_avma,
+                            di->rodata_avma + di->rodata_size - 1);
             }
          }
          if (inrx) {