From d298be2664ff8895ccad4546ba232c0d96b802f8 Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Thu, 22 Jan 2009 15:08:53 +0000 Subject: [PATCH] Accept zero size text segments. Bug #181594. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9025 --- coregrind/m_debuginfo/readelf.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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; -- 2.47.3