public inbox for gnu-gabi@sourceware.org
 help / color / mirror / Atom feed
From: Suprateeka R Hegde <hegdesmailbox@gmail.com>
To: Carlos O'Donell <carlos@redhat.com>,
	Roland McGrath <roland@hack.frob.com>
Cc: gnu-gabi@sourceware.org
Subject: Re: OSABI on Linux Distros
Date: Fri, 01 Jan 2016 00:00:00 -0000	[thread overview]
Message-ID: <a141d571-da8d-c9ab-df93-4e3d8f4e1810@gmail.com> (raw)
In-Reply-To: <e9242b4e-fa5e-30ab-1744-b1b841c56637@redhat.com>

On 18-Jun-2016 10:41 AM, Carlos O'Donell wrote:
> On 06/10/2016 05:22 PM, Roland McGrath wrote:
>>> What is the reason why we emit OSABI value as "UNIX - System V"
>>> (ELFOSABI_SYSV) even on GNU/Linux systems? Shouldn't it be just "GNU"
>>> (ELFOSABI_GNU)?
>>
>> In GNU systems the use of this field is specifically to indicate that
>> certain GNU extensions to ELF are used in the particular object.  In
>> particular, if any .dynsym entries use STT_GNU_IFUNC o STB_GNU_UNIQUE,
>> then e_ident[EI_OSABI] must be ELFOSABI_GNU.  Otherwise, it can be
>> ELFOSABI_NONE (aka ELFOSABI_SYSV).  In fact, it should be, and the
>> tools (linkers) implement that distinction.  This makes it possible
>> for current tools (without special switches or whatnot) to produce
>> binaries that are compatible with older dynamic linker implementations
>> that did not support these GNU extensions to ELF.
>>
>> This is arguably a bad overloading of the original instead of
>> EI_OSABI, but it's what's been done for GNU systems and so now it's an
>> unchangeable part of the GNU ELF gABI.
>
> Sure we might have to document this in the GNU ELF gABI, but nothing
> stops us from changing it and moving forward?
>
> Change binutils to generate ELFOSABI_GNU by default, with a
> "special switch" to allow people to generate pre-2009 glibc ld.so
> compatible binaries if they need it. You would need a sysroot to build
> with so they'd be using probably similar vintage tools anyway and don't
> have to worry. Then all binaries going forward are marked as being
> ELFOSABI_GNU binaries.
>
> The use case of being able to use ELFOSABI_GNU to determine how to decode
> values between PT_LOOS/PT_HIOS is the most relevant I've seen.
>
> Today with ELFOSABI_NONE you don't know how to decode those values, only
> though if one assumes that PT_LOOS/PT_HIOS values can overlap between
> any OS.

Thats absolutely what I think. I have a patch. I shall post it here soon.

And if we have good consensus, I shall talk to H.J to get this added to 
GNU-gABI.

--
Supra

  reply	other threads:[~2016-06-18  8:04 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-01  0:00 Suprateeka R Hegde
2016-01-01  0:00 ` Roland McGrath
2016-01-01  0:00   ` Carlos O'Donell
2016-01-01  0:00     ` Suprateeka R Hegde [this message]
2016-01-01  0:00   ` Suprateeka R Hegde
2016-01-01  0:00     ` Carlos O'Donell
2016-01-01  0:00       ` Suprateeka R Hegde
2016-01-01  0:00         ` Carlos O'Donell
2016-01-01  0:00           ` Suprateeka R Hegde

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=a141d571-da8d-c9ab-df93-4e3d8f4e1810@gmail.com \
    --to=hegdesmailbox@gmail.com \
    --cc=carlos@redhat.com \
    --cc=gnu-gabi@sourceware.org \
    --cc=roland@hack.frob.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).