summaryrefslogtreecommitdiffstats
path: root/translate.cxx
diff options
context:
space:
mode:
authorMark Wielaard <mjw@redhat.com>2009-04-08 12:35:01 +0200
committerMark Wielaard <mjw@redhat.com>2009-04-08 12:35:01 +0200
commitdc31eb39ab70d9d6b81d1ab02fd49795a4d8f2d0 (patch)
tree1af4e750a27f6c1735269a378cce4341a64b0513 /translate.cxx
parent07cee54d6fb720d4300972aaff9300ac8028c88d (diff)
downloadsystemtap-steved-dc31eb39ab70d9d6b81d1ab02fd49795a4d8f2d0.tar.gz
systemtap-steved-dc31eb39ab70d9d6b81d1ab02fd49795a4d8f2d0.tar.xz
systemtap-steved-dc31eb39ab70d9d6b81d1ab02fd49795a4d8f2d0.zip
Omit symbols that have suspicious addresses (before base) from symbol table.
* translate.cxx (dump_unwindsyms): Filter out sym.st_value < base values.
Diffstat (limited to 'translate.cxx')
-rw-r--r--translate.cxx7
1 files changed, 5 insertions, 2 deletions
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;