This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
RE: Stap is translating to functions in __exit sections...and later module load fails
- From: "Stone, Joshua I" <joshua dot i dot stone at intel dot com>
- To: "Keshavamurthy, Anil S" <anil dot s dot keshavamurthy at intel dot com>, "Mao, Bibo" <bibo dot mao at intel dot com>, "Eugeniy Meshcheryakov" <eugeniy dot meshcheryakov at googlemail dot com>
- Cc: "Systemtap" <systemtap at sources dot redhat dot com>
- Date: Tue, 17 Oct 2006 18:06:23 -0700
- Subject: RE: Stap is translating to functions in __exit sections...and later module load fails
On Tuesday, October 17, 2006 5:52 PM, Keshavamurthy, Anil S wrote:
> After commenting (i.e not discarding) *(.exit.text) from
> arch/ia64/kernel/vmlinux.lds.S file and booting with this new
> kernel, stap ignores functions in __exit sections and elaborates
> and translates functions properly.
The issue in stap/elfutils when __exit is discarded is that it can't
locate the function properly. It knows there's a function called
'exit_pfm_fs', but since it can't figure the probe address for the
function (since it was discarded), stap gets an address of 0x0. Then
blacklist_p tries to figure out what section that's in, and if that
section is .exit.*, the function is rejected. (Rejection in the case of
function("*") just means it is skipped, not an error.) In this case the
section is not .exit.* -- or rather, we don't know what section it's in
-- so the probe is added to the list.
Perhaps the simple solution would be to treat a probe address with an
*unknown* section as blacklisted as well. If we don't know what it is,
it probably isn't safe, right?
> Can someone tell me why this section is not discarded on Ia32?
Not me. But what is the point of __exit functions if they are always
discarded? Wouldn't you think that __exit should be kept around for
when the kernel exits?
Josh