bug-hurd
[Top][All Lists]
Advanced

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

Re: [PATCH 5/5] add setting gs/fsbase


From: Sergey Bugaev
Subject: Re: [PATCH 5/5] add setting gs/fsbase
Date: Fri, 21 Apr 2023 12:17:54 +0300

Hello,

On Fri, Apr 21, 2023 at 12:01 AM Samuel Thibault
<samuel.thibault@gnu.org> wrote:
> BTW, which dynamic linker path do we have set for x86_64-gnu?

It's in gcc/config/i386/gnu64.h in GCC tree:

#define GNU_USER_DYNAMIC_LINKER64 "/lib/ld-x86-64.so.1"

It was added by Flavio.

So GCC passes -dynamic-linker /lib/ld-x86-64.so.1 to ld. On its own,
ld sets /lib/ld64.so.1 as far as I can see. glibc installs its ld.so
into $prefix/lib/ld.so.1 (i.e. /usr/lib/ld.so.1 likely, or
/lib/ld.so.1 in no-/usr configuration).

So let's maybe choose a single path and use it consistently?

I would also expect distros to want to have a say in this. For
instance on Debian GNU/Linux x86_64 ld.so is at
/usr/lib/x86_64-linux-gnu/ld-2.31.so, but the toolchains still sets
/lib64/ld-linux-x86-64.so.2 in PT_INTERP, and to make this work they
have /usr/lib64 which contains just a single symlink:

/usr/lib64/ld-linux-x86-64.so.2 -> /lib/x86_64-linux-gnu/ld-2.31.so

Which maybe makes sense if they wish to keep binaries built on Debian
runnable on other distros. Do we want the same for Debian GNU/Hurd, or
maybe we want Debian-specific GCC/binutils configuration to set
PT_INTERP to /lib/x86_64-gnu/ld.so.1 directly? I imagine the Guix
folks may also have their own preference.

Sergey



reply via email to

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