public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* Hurd: /lib/ld.so vs. /lib/ld.so.1 (was: Policy: Require new dynamic loader names for entirely new ABIs?)
       [not found]       ` <Pine.LNX.4.64.1401220347300.3624@digraph.polyomino.org.uk>
@ 2014-01-22 15:52         ` Thomas Schwinge
  2014-01-29  6:26           ` Roland McGrath
  0 siblings, 1 reply; 2+ messages in thread
From: Thomas Schwinge @ 2014-01-22 15:52 UTC (permalink / raw)
  To: Roland McGrath, bug-hurd
  Cc: GNU C Library, Joseph S. Myers, Carlos O'Donell, gcc

[-- Attachment #1: Type: text/plain, Size: 1020 bytes --]

Hi!

On Wed, 22 Jan 2014 03:54:31 +0000, "Joseph S. Myers" <joseph@codesourcery.com> wrote:
> On Tue, 21 Jan 2014, Carlos O'Donell wrote:
> > > x86 Hurd (32-bit, hard-float): /lib/ld.so (that is, GCC uses that name
> > > with -dynamic-linker so in PT_INTERP; my understanding of
> > > shlib-versions is that it gets the SONAME ld.so.1 by default).
> > 
> > Is that a bug?
> 
> I don't know.  Thomas?

For x86 Hurd, GCC has been specifying »-dynamic-linker /lib/ld.so« in
LINK_SPEC since forever (1995, or earlier), and Debian glibc has had the
following since forever (2002, or earlier):

    ifeq ($(DEB_HOST_GNU_SYSTEM),gnu)
    # Why doesn't the glibc makefile install this?
           ln -sf ld.so.1 $(tmpdir)/$@/lib/ld.so
    endif

Roland, do you have any recollection of this?  Assuming that /lib/ld.so.1
is the "official" name, I suppose GCC should be changed, and then Debian
could drop the symbolic link after a transition period (full archive
rebuilt, etc.).


Grüße,
 Thomas

[-- Attachment #2: Type: application/pgp-signature, Size: 489 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Hurd: /lib/ld.so vs. /lib/ld.so.1 (was: Policy: Require new dynamic loader names for entirely new ABIs?)
  2014-01-22 15:52         ` Hurd: /lib/ld.so vs. /lib/ld.so.1 (was: Policy: Require new dynamic loader names for entirely new ABIs?) Thomas Schwinge
@ 2014-01-29  6:26           ` Roland McGrath
  0 siblings, 0 replies; 2+ messages in thread
From: Roland McGrath @ 2014-01-29  6:26 UTC (permalink / raw)
  To: Thomas Schwinge
  Cc: bug-hurd, GNU C Library, Joseph S. Myers, Carlos O'Donell, gcc

> For x86 Hurd, GCC has been specifying »-dynamic-linker /lib/ld.so« in
> LINK_SPEC since forever (1995, or earlier), and Debian glibc has had the
> following since forever (2002, or earlier):
> 
>     ifeq ($(DEB_HOST_GNU_SYSTEM),gnu)
>     # Why doesn't the glibc makefile install this?
>            ln -sf ld.so.1 $(tmpdir)/$@/lib/ld.so
>     endif
> 
> Roland, do you have any recollection of this?  Assuming that /lib/ld.so.1
> is the "official" name, I suppose GCC should be changed, and then Debian
> could drop the symbolic link after a transition period (full archive
> rebuilt, etc.).

The original rationale was that these are two different strings indicating
two different kinds of compatibility, and that there would be symlinks from
both of these names to the same implementation at any given moment.  That
thinking goes like this:

/lib/ld.so is the PT_INTERP string.  That identifies the ELF dynamic linker
layer of the ABI.  That doesn't need to change as long as programs' use of
ELF headers, symbol tables, and so forth does not need new or different
behavior.

ld.so.1 is the SONAME string.  That identifies the DSO that happens also to
be the dynamic linker, and its particular DSO ABI just as the SONAME of any
other DSO identifies that DSO's ABI.  That needs to change any time the set
of symbols exported by the dynamic linker changes incompatibly.  (All this
rationale pre-dates the symbol versioning features by a few years.)

Those notions remain sound as to what each string means.  But practical
reality and years of experience lead in different directions.  It has
become very clear that by far the easiest way to retain compatibility for a
variety of binary vintages and flavors sharing a filesystem is to have
their loading paths diverge as early as possible.  PT_INTERP is the
earliest step in the process that is really under userland control, so
that's the spot.  It's trivial to make multiple names resolve to the same
actual thing (with symlinks) when one thing can serve multiple
flavors/vintages but it's very difficult to go in the other direction.

That says that if the canonical PT_INTERP string for Hurd is going to
change, it might as well change in the direction of being much more
specific.  e.g. /lib/ld-gnu-i386.so.1 or something like that.


Thanks,
Roland

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-01-28 22:24 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <52DD4BB8.1090901@redhat.com>
     [not found] ` <52DD56C8.109@redhat.com>
     [not found]   ` <Pine.LNX.4.64.1401212208100.25161@digraph.polyomino.org.uk>
     [not found]     ` <52DF3E13.6050408@redhat.com>
     [not found]       ` <Pine.LNX.4.64.1401220347300.3624@digraph.polyomino.org.uk>
2014-01-22 15:52         ` Hurd: /lib/ld.so vs. /lib/ld.so.1 (was: Policy: Require new dynamic loader names for entirely new ABIs?) Thomas Schwinge
2014-01-29  6:26           ` Roland McGrath

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).