* [Linux-ia64] Question about .opd section
@ 2003-02-03 16:37 Wichmann, Mats D
2003-02-03 19:19 ` David Mosberger
2003-02-03 20:55 ` Jim Wilson
0 siblings, 2 replies; 3+ messages in thread
From: Wichmann, Mats D @ 2003-02-03 16:37 UTC (permalink / raw)
To: linux-ia64
The gnu toolchain (well, binutils) emits a .opd section
for architectures which use function descriptors -
it's not unique to Itanium.
But I can't find much information about it. Google
has been unhelpful (to me, anyway) on this one. It's
described as holding function descriptors, but I'm not
clear who uses this information - is this used at
runtime?
Is this section considered normal/required for
Linux/ia64? I'm asking because it wasn't in the
Itanium psABI, and thus didn't make it into the
current version of the Itanium LSB spec; our
application checker tool is flagging this as an
unknown section.
Thanks,
Mats
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Linux-ia64] Question about .opd section
2003-02-03 16:37 [Linux-ia64] Question about .opd section Wichmann, Mats D
@ 2003-02-03 19:19 ` David Mosberger
2003-02-03 20:55 ` Jim Wilson
1 sibling, 0 replies; 3+ messages in thread
From: David Mosberger @ 2003-02-03 19:19 UTC (permalink / raw)
To: linux-ia64
>>>>> On Mon, 3 Feb 2003 08:37:48 -0800, "Wichmann, Mats D" <mats.d.wichmann@intel.com> said:
Mats> The gnu toolchain (well, binutils) emits a .opd section
Mats> for architectures which use function descriptors -
Mats> it's not unique to Itanium.
As far as I know, this is an HPism (originally coming from HP-UX
PA-RISC). "opd" stands for "official procedure descriptor". the
"official" is in the sense that the address of each descriptor serves
as the canonical "address" of the function it's describing; i.e., this
is what makes function-pointer comparisons work.
Mats> But I can't find much information about it. Google has been
Mats> unhelpful (to me, anyway) on this one. It's described as
Mats> holding function descriptors, but I'm not clear who uses this
Mats> information - is this used at runtime?
Nothing at run-time directly references the .opd section, but of
course whenever you call a function through a pointer, you'll end up
loading the function's global-pointer and it's entry point from a
descriptor. The main program's descriptor are stored in .opd (for
shared objects, the function descriptors are created at runtime, by
the runtime loader).
Mats> Is this section considered normal/required for
Mats> Linux/ia64? I'm asking because it wasn't in the
Mats> Itanium psABI, and thus didn't make it into the
Mats> current version of the Itanium LSB spec; our
Mats> application checker tool is flagging this as an
Mats> unknown section.
It might be good to document it in the LSB. There might be tools out
there that assume that .opd contains nothing but function descriptors,
so if someone put something else in there, things might go wrong badly
(which reeminds me: the ptrace-support in libunwind accesses .opd as a
fallback-mechanism to determine the global-pointer of the main
program; so there is at least one library out there that would break
if .opd contained other stuff).
--david
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Linux-ia64] Question about .opd section
2003-02-03 16:37 [Linux-ia64] Question about .opd section Wichmann, Mats D
2003-02-03 19:19 ` David Mosberger
@ 2003-02-03 20:55 ` Jim Wilson
1 sibling, 0 replies; 3+ messages in thread
From: Jim Wilson @ 2003-02-03 20:55 UTC (permalink / raw)
To: linux-ia64
binutils@sources.redhat.com is a better place to ask questions like this.
This is where the binutils experts hang out.
I found a comment in the IA-64 bfd support that says .opd contains "official
procedure descriptors". I don't know where the terminology came from though.
The function descriptors are required for executing IA-64 code, so this is
definitely a normal section when using the GNU tools. The section is
required if present. The section is created by the linker, if one of the
object files being linked uses a relocation type that requires that a
function descriptor be created, e.g. LTOFF_FPTR22. The 2-word function
descriptor goes in the .opd section, the address of the descriptor goes in
the GOT, and the gcc generated code loads the address from the GOT.
I don't have easy access to any other IA-64 compiler, so I can't comment on
how other compilers handle this.
Jim
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2003-02-03 20:55 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-02-03 16:37 [Linux-ia64] Question about .opd section Wichmann, Mats D
2003-02-03 19:19 ` David Mosberger
2003-02-03 20:55 ` Jim Wilson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox