From: Paul Floyd Date: Fri, 22 Dec 2023 18:59:56 +0000 (+0100) Subject: Bug 478837 - valgrind fails to read debug info for rust binaries X-Git-Tag: VALGRIND_3_23_0~223 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=171eaee3bd3f83d2d8de363711ffeb27a18ef940;p=thirdparty%2Fvalgrind.git Bug 478837 - valgrind fails to read debug info for rust binaries 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. --- diff --git a/NEWS b/NEWS index 839407479f..34ad143b5b 100644 --- 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 diff --git a/coregrind/m_debuginfo/readelf.c b/coregrind/m_debuginfo/readelf.c index 418ee8627c..db523230b7 100644 --- a/coregrind/m_debuginfo/readelf.c +++ b/coregrind/m_debuginfo/readelf.c @@ -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) {