diff options
author | Mark Wielaard <mjw@redhat.com> | 2009-02-20 14:12:19 +0100 |
---|---|---|
committer | Mark Wielaard <mjw@redhat.com> | 2009-02-20 14:12:19 +0100 |
commit | adc67597f327cd43d58b1d0cb740dab14a75a058 (patch) | |
tree | 6afa8977998bb4f52c79232e7868845fde8d0aee | |
parent | 949b499021e32cd79b16478d9895beb045ede2b3 (diff) | |
download | systemtap-steved-adc67597f327cd43d58b1d0cb740dab14a75a058.tar.gz systemtap-steved-adc67597f327cd43d58b1d0cb740dab14a75a058.tar.xz systemtap-steved-adc67597f327cd43d58b1d0cb740dab14a75a058.zip |
Ignore kernel functions with "absolute" addresses.
translate.cxx (dump_unwindsyms): Augment the test for creating the
stap-symbols to be STT_FUNC && !(SHN_UNDEF || SHN_ABS). The combination
STT_FUNC && SHN_ABS only seems to occur on older i386 kernels and covers
the vDSO "functions" we were seeing.
-rw-r--r-- | translate.cxx | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/translate.cxx b/translate.cxx index e87e9876..c0e76a02 100644 --- a/translate.cxx +++ b/translate.cxx @@ -4538,18 +4538,17 @@ dump_unwindsyms (Dwfl_Module *m, clog << "Found kernel _stext 0x" << hex << extra_offset << dec << endl; } + // We only need the function symbols to identify kernel-mode + // 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. if (GELF_ST_TYPE (sym.st_info) == STT_FUNC && - sym.st_shndx != SHN_UNDEF) + ! (sym.st_shndx == SHN_UNDEF || sym.st_shndx == SHN_ABS)) { Dwarf_Addr sym_addr = sym.st_value; const char *secname = NULL; - // Symbol addresses before the base address of the module - // are suspect. Older kernels had those for some vsdo - // symbols. They mess up our logic, ignore them. - if (sym_addr < base) - continue; - if (n > 0) // only try to relocate if there exist relocation bases { int ki = dwfl_module_relocate_address (m, &sym_addr); |