This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
Re: inconsistent module relocation in elfutils
- From: Roland McGrath <roland at redhat dot com>
- To: "Frank Ch. Eigler" <fche at redhat dot com>
- Cc: systemtap at sources dot redhat dot com
- Date: Fri, 4 Nov 2005 12:37:15 -0800 (PST)
- Subject: Re: inconsistent module relocation in elfutils
> Specifically, with some kernel versions (e.g. 2.6.13-1.1532_FC4) I
> find that the GElf_Shdr sh_addr fields of .text-like sections are
> correctly relocated, and for other kernel versions (2.6.9-22.EL), that
> field is left at zero. Can you suggest an explanation or workaround?
You should not have any particular expectations about section headers in
ET_REL modules. The fact that you see an sh_addr you can use there is more
an artifact of the implementation than something you should be relying on.
When using the style of module callback now in use (-k), the only sections
whose addresses are noted are those needed to relocate the debug info.
> One can put a breakpoint at tapsets.cxx:1673 and look at variable "*shdr".
I don't think that code is the right way to do that. Instead use
dwfl_module_relocate_address and dwfl_module_relocation_info to get the
section name.