Gmail Calendar Documents Reader Web more »
Recently Visited Groups | Help | Sign in
Google Groups Home
Solaris PT_SUNW_UNWIND is not in agreement with amd64 ABI
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  6 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post will appear after it is approved by moderators
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Ali Bahrami  
View profile  
 More options Feb 25, 5:25 pm
From: Ali Bahrami <Ali.Bahr...@Sun.COM>
Date: Wed, 25 Feb 2009 14:25:10 -0800 (PST)
Local: Wed, Feb 25 2009 5:25 pm
Subject: Solaris PT_SUNW_UNWIND is not in agreement with amd64 ABI
[I sent the following to disc...@x86-64.org. I'm repeating it here,
because
the unwind program header has applicability beyond the amd64 abi.]

   I work on the Solaris linkers, and have encountered
an amd64 ABI compliance issue that I need to resolve.

   I was comparing Linux and Solaris amd64 objects yesterday,
and discovered that Solaris is using the wrong value for
PT_SUNW_UNWIND! The ABI says this:

    -------------------------------------------------------
    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_UNWIND             0x6474e550
    PT_GNU_EH_FRAME and PT_SUNW_UNWIND The segment contains the
    stack unwind tables. See Section 4.2.4 of this document.
    -------------------------------------------------------

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 */

It appears that this is nothing more than an unfortunate typo, made in
October 2004, and subsequently released in Solaris 10, our first
release with amd64 support. So, now, there exist 4+ years of Solaris
objects
with this value embedded in them, all of which work properly. There
has never
been a Solaris object that used the ABI-mandated value.

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.

Instead, I wonder if there would be an objection to changing the
amd64 ABI to simply codify what has already happened. Although it
isn't ideal, I think this solution is the least disruptive way
forward from the place we now find ourselves. Using context diff
style markings, the text quoted above would then become:

    -------------------------------------------------------
-                     PT_SUNW_UNWIND             0x6474e550
+                     PT_SUNW_UNWIND             0x6464e550
    -------------------------------------------------------

If so, how would I go about getting that change made?

Thanks...

- Ali


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Michael Matz  
View profile  
 More options Feb 26, 7:11 am
From: Michael Matz <m...@suse.de>
Date: Thu, 26 Feb 2009 13:11:18 +0100 (CET)
Local: Thurs, Feb 26 2009 7:11 am
Subject: Re: Solaris PT_SUNW_UNWIND is not in agreement with amd64 ABI
Hi,

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.


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Evandro Menezes  
View profile  
 More options Feb 26, 11:00 am
From: Evandro Menezes <aevan...@gmail.com>
Date: Thu, 26 Feb 2009 08:00:48 -0800 (PST)
Local: Thurs, Feb 26 2009 11:00 am
Subject: Re: Solaris PT_SUNW_UNWIND is not in agreement with amd64 ABI
On Feb 25, 4:25 pm, Ali Bahrami <Ali.Bahr...@Sun.COM> wrote:

> Instead, I wonder if there would be an objection to changing the
> amd64 ABI to simply codify what has already happened. Although it
> isn't ideal, I think this solution is the least disruptive way
> forward from the place we now find ourselves. Using context diff
> style markings, the text quoted above would then become:

>     -------------------------------------------------------
> -                     PT_SUNW_UNWIND             0x6474e550
> +                     PT_SUNW_UNWIND             0x6464e550
>     -------------------------------------------------------

I don't see a problem with it off-hand, since possibly only Solaris
has used PT_SUNW_UNWIND.  What value does Sun Studio for Linux use
though?

Thanks.


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Ali Bahrami  
View profile  
 More options Feb 26, 11:16 am
From: Ali Bahrami <Ali.Bahr...@Sun.COM>
Date: Thu, 26 Feb 2009 09:16:19 -0700
Local: Thurs, Feb 26 2009 11:16 am
Subject: Re: Solaris PT_SUNW_UNWIND is not in agreement with amd64 ABI

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


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Ali Bahrami  
View profile  
 More options Mar 10, 2:38 pm
From: Ali Bahrami <Ali.Bahr...@Sun.COM>
Date: Tue, 10 Mar 2009 12:38:27 -0600
Local: Tues, Mar 10 2009 2:38 pm
Subject: Re: Solaris PT_SUNW_UNWIND is not in agreement with amd64 ABI

    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


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Michael Matz  
View profile  
 More options Mar 11, 6:28 am
From: Michael Matz <m...@suse.de>
Date: Wed, 11 Mar 2009 11:28:50 +0100 (CET)
Local: Wed, Mar 11 2009 6:28 am
Subject: Re: Solaris PT_SUNW_UNWIND is not in agreement with amd64 ABI
Hi,

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.


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2009 Google