From: Julian Seward Date: Mon, 3 Mar 2008 15:51:58 +0000 (+0000) Subject: Don't be quite so paranoid about rejecting symbols that fall outside X-Git-Tag: svn/VALGRIND_3_4_0~973 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=50a23bf8610a4e3ddc2b7ba8db5af1bdbadb5063;p=thirdparty%2Fvalgrind.git Don't be quite so paranoid about rejecting symbols that fall outside the .text segment. Instead only reject ones that fall outside the r-x area. This is in line with r7427, which instituted such a change in other places in the system. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7546 --- diff --git a/coregrind/m_debuginfo/readelf.c b/coregrind/m_debuginfo/readelf.c index ca9ef0cc57..24aeb5bda2 100644 --- a/coregrind/m_debuginfo/readelf.c +++ b/coregrind/m_debuginfo/readelf.c @@ -458,7 +458,19 @@ Bool get_elf_symbol_info ( if (*is_text_out) { - if (!in_text) { + /* This used to reject any symbol falling outside the text + segment ("if (!in_text) ..."). Now it is relaxed slightly, + to reject only symbols which fall outside the area mapped + r-x. This is in accordance with r7427. See + "Comment_Regarding_Text_Range_Checks" in storage.c for + background. */ + Bool in_rx; + vg_assert(di->have_rx_map); + in_rx = (!(*sym_avma_out + *sym_size_out <= di->rx_map_avma + || *sym_avma_out >= di->rx_map_avma + di->rx_map_size)); + if (in_text) + vg_assert(in_rx); + if (!in_rx) { TRACE_SYMTAB( "ignore -- %p .. %p outside .text svma range %p .. %p\n", *sym_avma_out, *sym_avma_out + *sym_size_out,