This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
Re: PR10000: emit _stp_relocate* calculations correctly for kernel/module global $data (Was: [SCM] systemtap: system-wide probe/trace tool branch, master, updated. release-0.9-238-g432f054)
Hi Roland,
On Fri, 2009-04-17 at 14:17 -0700, Roland McGrath wrote:
> > We also need the size of the relocation sections to lookup other info for
> > an address at runtime we associate with a module, like the unwind tables.
>
> I don't entirely follow this part. (You mean "relocated sections", right?
> A "relocation section" is the SHT_REL/SHT_RELA section.)
Yes, I mean the relocated sections.
> You are packing the unwind info taken from a .ko's .debug_frame for use at
> runtime. All the address literals therein will need to be relocated at run
> time. For each one, you need to emit the symbol+offset or section+offset
> information to use at runtime. dwfl_relocate_address when you pack gives
> you section+offset. i.e., this is the same as loc2c-emitted addresses,
> probe addresses, etc. None of that procedure needs to know the size of a
> section, neither at translation time nor at runtime.
None of this needs the size of the section indeed. Although I have to
check we do the right thing at runtime now that you described it again.
> So what's the size for?
So at runtime we have an address and we want to know which
module/section it is part of so we can lookup the correct symbol or
unwind table we need to use. We do that by looking through our
module/section list and check that the address we have falls between the
start of the module/section (at runtime) and the end (for which we need
to know the size of the section).
Cheers,
Mark
- References:
- PR10000: emit _stp_relocate* calculations correctly for kernel/module global $data (Was: [SCM] systemtap: system-wide probe/trace tool branch, master, updated. release-0.9-238-g432f054)
- Re: PR10000: emit _stp_relocate* calculations correctly for kernel/module global $data (Was: [SCM] systemtap: system-wide probe/trace tool branch, master, updated. release-0.9-238-g432f054)
- Re: PR10000: emit _stp_relocate* calculations correctly for kernel/module global $data (Was: [SCM] systemtap: system-wide probe/trace tool branch, master, updated. release-0.9-238-g432f054)
- Re: PR10000: emit _stp_relocate* calculations correctly for kernel/module global $data (Was: [SCM] systemtap: system-wide probe/trace tool branch, master, updated. release-0.9-238-g432f054)
- Re: PR10000: emit _stp_relocate* calculations correctly for kernel/module global $data (Was: [SCM] systemtap: system-wide probe/trace tool branch, master, updated. release-0.9-238-g432f054)
- Re: PR10000: emit _stp_relocate* calculations correctly for kernel/module global $data (Was: [SCM] systemtap: system-wide probe/trace tool branch, master, updated. release-0.9-238-g432f054)
- Re: PR10000: emit _stp_relocate* calculations correctly for kernel/module global $data (Was: [SCM] systemtap: system-wide probe/trace tool branch, master, updated. release-0.9-238-g432f054)
- Re: PR10000: emit _stp_relocate* calculations correctly for kernel/module global $data (Was: [SCM] systemtap: system-wide probe/trace tool branch, master, updated. release-0.9-238-g432f054)
- Re: PR10000: emit _stp_relocate* calculations correctly for kernel/module global $data (Was: [SCM] systemtap: system-wide probe/trace tool branch, master, updated. release-0.9-238-g432f054)
- Re: PR10000: emit _stp_relocate* calculations correctly for kernel/module global $data (Was: [SCM] systemtap: system-wide probe/trace tool branch, master, updated. release-0.9-238-g432f054)