bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug binutils/12913] Should rename ELFOSABI_LINUX into ELFOSABI_GNU, an


From: rmh at gnu dot org
Subject: [Bug binutils/12913] Should rename ELFOSABI_LINUX into ELFOSABI_GNU, and drop ELFOSABI_HURD
Date: Mon, 09 Apr 2012 08:14:06 +0000

http://sourceware.org/bugzilla/show_bug.cgi?id=12913

--- Comment #8 from Robert Millan <rmh at gnu dot org> 2012-04-09 08:14:06 UTC 
---
(In reply to comment #7)
> How would this have worked before?  The value 0 (ELFOSABI_NONE) is used
> for nearly all ELF files on GNU systems (GNU/Linux, GNU/Hurd) that don't
> need any special handling.

That's not the point. The problem is that meaning of e_ident[EI_OSABI] has been
redefined.  Previously when ELF said "operating system", it was asssumed that
different OSes that share only the kernel (e.g. FreeBSD and GNU/kFreeBSD) also
shared the same OSABI number, and different OSes that share the userland (e.g.
GNU/Linux and GNU/kFreeBSD) didn't had to have a common OSABI number.

The FreeBSD project followed this convention by using OSABI to identify, during
executable load by the kernel, which syscall ABI was going to be required by
the new process.

OTOH GNU project disregarded that tag and promoted use of ELFOSABI_NONE.

This disparity caused minor nuissances, but it was bearable.

Then with this change, you're redefining what OSABI means. Redefining an ABI
that's been strongly relied on for decades is a big no-no. Only the fact that
you had to rename ELFOSABI_LINUX to ELFOSABI_GNU should hint that there's
something really wrong with this change.

Now we're stuck in a situation in which we can't be a "GNU system" and a
"kFreeBSD-based system" at the same time. If the GNU toolchain adds features
that depend on GNU userland being present, it will check for ELFOSABI_GNU. But
our binaries can't be ELFOSABI_GNU, because the kernel wants them to be
ELFOSABI_FREEBSD.

So to answer your question: how could this have worked before? Well, the whole
OS identification conventions worked because we didn't have contradicting ideas
on what OSABI means. Now they don't work anymore. This specific feature? I
don't think it worked before. The real question is: if we wanted it to work,
how can we do this, now that it's impossible to satisfy the runtime checks?

Or something even more worrying: right now it's an optional feature. We could
easily opt out of it, but that will happen when it's not an optional feature,
but a mandatory requirement that depends on ELFOSABI_GNU? The way you're laying
things out, it's certainly possible that this happens someday.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]