From dc31eb39ab70d9d6b81d1ab02fd49795a4d8f2d0 Mon Sep 17 00:00:00 2001 From: Mark Wielaard Date: Wed, 8 Apr 2009 12:35:01 +0200 Subject: Omit symbols that have suspicious addresses (before base) from symbol table. * translate.cxx (dump_unwindsyms): Filter out sym.st_value < base values. --- translate.cxx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'translate.cxx') diff --git a/translate.cxx b/translate.cxx index c42097bb..3442703d 100644 --- a/translate.cxx +++ b/translate.cxx @@ -4576,10 +4576,13 @@ dump_unwindsyms (Dwfl_Module *m, // PC's, so we omit undefined or "fake" absolute addresses. // These fake absolute addresses occur in some older i386 // kernels to indicate they are vDSO symbols, not real - // functions in the kernel. + // functions in the kernel. We also omit symbols that have + // suspicious addresses (before base). if ((GELF_ST_TYPE (sym.st_info) == STT_FUNC || GELF_ST_TYPE (sym.st_info) == STT_OBJECT) // PR10000: also need .data - && !(sym.st_shndx == SHN_UNDEF || sym.st_shndx == SHN_ABS)) + && !(sym.st_shndx == SHN_UNDEF + || sym.st_shndx == SHN_ABS + || sym.st_value < base)) { Dwarf_Addr sym_addr = sym.st_value; const char *secname = NULL; -- cgit