On Wed, 25 Feb 2009, Ali Bahrami wrote:
> GNU and Sun are supposed to use the same value, but are allowed their
> own names for it.
>
> However, the value actually used by Solaris, defined in
> /usr/include/sys/elf.h, is different:
>
> #define PT_SUNW_UNWIND 0x6464e550 /* amd64 UNWIND program
> header */
Hmm, unfortunate ...
> It is of course possible for us to change Solaris to use the ABI
> mandated value. Since we have existing objects in the field, we'll end
> up having to support both values forever, which is ugly, and which
> offers little benefit to the Solaris community, or to the wider amd64
> community.
... but I have the same feeling. There's not much sense in codifying
contradictions to reality, nor is there for disrupting reality to follow a
spec for minor issues like this.
> -------------------------------------------------------
> - PT_SUNW_UNWIND 0x6474e550
> + PT_SUNW_UNWIND 0x6464e550
> -------------------------------------------------------
>
> If so, how would I go about getting that change made?
I can make the change if there are no objections. I'll wait some time, a
week or two for other opinions to show up, remind me in two weeks
:)
Ciao,
Michael.
Program headers are produced by the link-editor (ld). Sun Studio for
Linux must be using the GNU ld, since the Solaris ld isn't available
there, so the proper value for PT_GNU_EH_FRAME would be used.
- Ali
It's been almost 2 weeks, and there were no objections, so
I'd like to move forward with this. Here is my proposed text
for the amd64 ABI:
-------------------------------------------------------
5.1.1 Program header
The following AMD64 program header types are defined:
Table 5.1: Program Header Types
Name Value
PT_GNU_EH_FRAME 0x6474e550
PT_SUNW_EH_FRAME 0x6474e550
PT_SUNW_UNWIND 0x6464e550
-------------------------------------------------------
PT_SUNW_EH_FRAME is a new name in the Solaris OSABI namespace
that has the original ABI mandated value of 0x6474e550. The name
follows the pattern set by PT_GNU_EH_FRAME.
The Solaris link-editor will continue to generate PT_SUNW_UNWIND for
the reasons previously mentioned. However, the runtime linker will
accept both SUNW values. I've already made these changes to Solaris,
and will be integrating them within the next week or so. They should
surface in OpenSolaris within a month or so.
Thanks for your help.
- Ali
On Tue, 10 Mar 2009, Ali Bahrami wrote:
> It's been almost 2 weeks, and there were no objections, so
> I'd like to move forward with this.
Committed as r219. I'll see if I can somehow trigger building the pdf on
the webpage. It keeps breaking :-/
Ciao,
Michael.