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: Failures with exelib.exp testcase (was Re: minutes 2010-08-19)


On Tue, 2011-02-08 at 10:45 -0800, Roland McGrath wrote:
> > I see your point, but do we really need a runtime test? Can't we just
> > have a check when reading in the elf file symbols, that just looks
> > whether or not there is an .odp section?
> 
> To clarify, "runtime" means "runtime of the translator".  So you are not
> suggesting doing a check in a different phase than what I said, just using
> a different method of analyzing the user binary in question.

Ah, sorry, I misunderstood.

> Why is it that you would prefer looking for an .odp section to looking at
> the machine the binary is built for?

It seemed more general than an e_machine type check. But it looks like I
was wrong about that. I thought I read somewhere ia64 also used them,
but now cannot find the reference.

> In general, ELF sections are not supposed to be a primary mechanism for
> anything after final-link time.  It's a general rule in ELF that any time
> you are basing something on a section name, you are doing it wrong.  It's
> also always kosher for the link to have used a linker script that combined
> several sections together, etc.

So, after linking, using program header good, using section headers bad.
Yeah, we have had this discussion (my confusion) before. Apologies.
I am still unsure what to do about that section number hack we have in
translate.cxx dump_unwindsyms, aka PR10088. Although now that I think
about it, all this confusion in that PR might just be because .ko files
are just not really linked yet.

> The section name ".opd" is not part of the ppc64 ABI.  What is formally
> said in the ABI is that the symbol name for a function (which I read to
> mean any STT_FUNC symbol) that does not begin with a dot is the address of
> the function descriptor.  Anyway, it is far simpler to check the header for
> .e_machine == EM_PPC64 than to look for a particular section name.

I did have a hard time finding any information about the .odp section.
So I assume it really isn't anything that can be relied upon.

Thanks,

Mark


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