From: Tom Hughes Date: Thu, 22 Jan 2009 15:08:53 +0000 (+0000) Subject: Accept zero size text segments. Bug #181594. X-Git-Tag: svn/VALGRIND_3_5_0~1059 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=d298be2664ff8895ccad4546ba232c0d96b802f8;p=thirdparty%2Fvalgrind.git Accept zero size text segments. Bug #181594. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9025 --- diff --git a/coregrind/m_debuginfo/readelf.c b/coregrind/m_debuginfo/readelf.c index 9f4bd7675b..6ba6ac86ef 100644 --- a/coregrind/m_debuginfo/readelf.c +++ b/coregrind/m_debuginfo/readelf.c @@ -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;