This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: function symbols before module base address


Hi Roland,

On Thu, 2009-02-19 at 14:53 -0800, Roland McGrath wrote:
> The kernel abuses its ELF symbol table for a few extra purposes.

Ah, see, I thought there was something fishy about some of these
symbols. Thanks for your explanation.

>   In these
> cases, the symbol value is storing a constant, not an actual address in the
> kernel. [...]
> These cases are all SHN_ABS.  They are probably also all STT_NOTYPE.
> Possibly you could use that filter to ignore them.  It's not really
> guaranteed in any kosher way that some SHN_ABS, STT_NOTYPE symbols won't
> ever be an actual address symbol.  

We do filter on STT_FUNC && !SHN_UNDEF.

> If the only need for these symbols is to identify kernel-mode PC's with a
> name, then you'd probably be fine just omitting all SHN_ABS symbols
> altogether.  These are never the ones generated by the compiler or the
> assembler based on a label in the code.

OK, I'll augment the test 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.

Thanks,

Mark


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]