]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Accept zero size text segments. Bug #181594.
authorTom Hughes <tom@compton.nu>
Thu, 22 Jan 2009 15:08:53 +0000 (15:08 +0000)
committerTom Hughes <tom@compton.nu>
Thu, 22 Jan 2009 15:08:53 +0000 (15:08 +0000)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9025

coregrind/m_debuginfo/readelf.c

index 9f4bd7675b008b8b619edd604d5c35ef05e9d67f..6ba6ac86ef95212626fab94ae1578a93d0589210 100644 (file)
@@ -1344,9 +1344,9 @@ Bool ML_(read_elf_debug_info) ( struct _DebugInfo* di )
       /* Find avma-s for: .text .data .sdata .rodata .bss .sbss .plt .got .opd
          and .eh_frame */
 
-      /* Accept .text where mapped as rx (code) */
+      /* Accept .text where mapped as rx (code), even if zero-sized */
       if (0 == VG_(strcmp)(name, ".text")) {
-         if (inrx && size > 0 && !di->text_present) {
+         if (inrx && size >= 0 && !di->text_present) {
             di->text_present = True;
             di->text_svma = svma;
             di->text_avma = svma + rx_bias;