* [PATCH v2] elf: Install a symbolic link to ld.so as /usr/bin/ld.so
@ 2021-11-15 19:07 Florian Weimer
2021-11-23 15:56 ` Florian Weimer
` (2 more replies)
0 siblings, 3 replies; 9+ messages in thread
From: Florian Weimer @ 2021-11-15 19:07 UTC (permalink / raw)
To: libc-alpha
This makes ld.so features such as --preload, --audit,
and --list-diagnostics more accessible to end users because they
do not need to know the ABI name of the dynamic loader.
---
v2: Use $(make-link).
NEWS | 4 ++++
elf/Makefile | 7 ++++++-
2 files changed, 10 insertions(+), 1 deletion(-)
diff --git a/NEWS b/NEWS
index f10971b180..2f56f3db28 100644
--- a/NEWS
+++ b/NEWS
@@ -68,6 +68,10 @@ Major new features:
to be used by compilers for optimizing usage of 'memcmp' when its
return value is only used for its boolean status.
+* A symbolic link to the dynamic linker is now installed under
+ /usr/bin/ld.so (or ${bindir}/ld.so if glibc is not configured with
+ --prefix=/usr).
+
Deprecated and removed features, and other changes affecting compatibility:
* The r_version update in the debugger interface makes the glibc binary
diff --git a/elf/Makefile b/elf/Makefile
index 72004484db..06cfde778c 100644
--- a/elf/Makefile
+++ b/elf/Makefile
@@ -110,7 +110,7 @@ endif
ifeq (yes,$(build-shared))
extra-objs = $(all-rtld-routines:%=%.os) sofini.os interp.os
generated += librtld.os dl-allobjs.os ld.so ldd
-install-others = $(inst_rtlddir)/$(rtld-installed-name)
+install-others = $(inst_rtlddir)/$(rtld-installed-name) $(inst_bindir)/ld.so
install-bin-script = ldd
endif
@@ -682,6 +682,11 @@ $(inst_rtlddir)/$(rtld-installed-name): $(objpfx)ld.so $(+force)
$(make-target-directory)
$(do-install-program)
+# Creates the relative /usr/bin/ld.so symbolic link.
+$(inst_bindir)/ld.so: $(inst_rtlddir)/$(rtld-installed-name)
+ $(make-target-directory)
+ $(make-link)
+
# Special target called by parent to install just the dynamic linker.
.PHONY: ldso_install
ldso_install: $(inst_rtlddir)/$(rtld-installed-name)
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH v2] elf: Install a symbolic link to ld.so as /usr/bin/ld.so
2021-11-15 19:07 [PATCH v2] elf: Install a symbolic link to ld.so as /usr/bin/ld.so Florian Weimer
@ 2021-11-23 15:56 ` Florian Weimer
2021-11-23 16:19 ` Andreas Schwab
2021-12-04 19:12 ` Florian Weimer
2 siblings, 0 replies; 9+ messages in thread
From: Florian Weimer @ 2021-11-23 15:56 UTC (permalink / raw)
To: Florian Weimer via Libc-alpha
* Florian Weimer via Libc-alpha:
> This makes ld.so features such as --preload, --audit,
> and --list-diagnostics more accessible to end users because they
> do not need to know the ABI name of the dynamic loader.
>
> ---
> v2: Use $(make-link).
> NEWS | 4 ++++
> elf/Makefile | 7 ++++++-
> 2 files changed, 10 insertions(+), 1 deletion(-)
>
> diff --git a/NEWS b/NEWS
> index f10971b180..2f56f3db28 100644
> --- a/NEWS
> +++ b/NEWS
> @@ -68,6 +68,10 @@ Major new features:
> to be used by compilers for optimizing usage of 'memcmp' when its
> return value is only used for its boolean status.
>
> +* A symbolic link to the dynamic linker is now installed under
> + /usr/bin/ld.so (or ${bindir}/ld.so if glibc is not configured with
> + --prefix=/usr).
> +
> Deprecated and removed features, and other changes affecting compatibility:
>
> * The r_version update in the debugger interface makes the glibc binary
> diff --git a/elf/Makefile b/elf/Makefile
> index 72004484db..06cfde778c 100644
> --- a/elf/Makefile
> +++ b/elf/Makefile
> @@ -110,7 +110,7 @@ endif
> ifeq (yes,$(build-shared))
> extra-objs = $(all-rtld-routines:%=%.os) sofini.os interp.os
> generated += librtld.os dl-allobjs.os ld.so ldd
> -install-others = $(inst_rtlddir)/$(rtld-installed-name)
> +install-others = $(inst_rtlddir)/$(rtld-installed-name) $(inst_bindir)/ld.so
> install-bin-script = ldd
> endif
>
> @@ -682,6 +682,11 @@ $(inst_rtlddir)/$(rtld-installed-name): $(objpfx)ld.so $(+force)
> $(make-target-directory)
> $(do-install-program)
>
> +# Creates the relative /usr/bin/ld.so symbolic link.
> +$(inst_bindir)/ld.so: $(inst_rtlddir)/$(rtld-installed-name)
> + $(make-target-directory)
> + $(make-link)
> +
> # Special target called by parent to install just the dynamic linker.
> .PHONY: ldso_install
> ldso_install: $(inst_rtlddir)/$(rtld-installed-name)
Ping? This patch needs review. Do we want to make this change?
Thanks,
Florian
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH v2] elf: Install a symbolic link to ld.so as /usr/bin/ld.so
2021-11-15 19:07 [PATCH v2] elf: Install a symbolic link to ld.so as /usr/bin/ld.so Florian Weimer
2021-11-23 15:56 ` Florian Weimer
@ 2021-11-23 16:19 ` Andreas Schwab
2021-11-23 16:38 ` Florian Weimer
2021-12-04 19:12 ` Florian Weimer
2 siblings, 1 reply; 9+ messages in thread
From: Andreas Schwab @ 2021-11-23 16:19 UTC (permalink / raw)
To: Florian Weimer via Libc-alpha; +Cc: Florian Weimer
On Nov 15 2021, Florian Weimer via Libc-alpha wrote:
> This makes ld.so features such as --preload, --audit,
> and --list-diagnostics more accessible to end users because they
> do not need to know the ABI name of the dynamic loader.
Ok.
> diff --git a/NEWS b/NEWS
> index f10971b180..2f56f3db28 100644
> --- a/NEWS
> +++ b/NEWS
> @@ -68,6 +68,10 @@ Major new features:
> to be used by compilers for optimizing usage of 'memcmp' when its
> return value is only used for its boolean status.
>
> +* A symbolic link to the dynamic linker is now installed under
> + /usr/bin/ld.so (or ${bindir}/ld.so if glibc is not configured with
> + --prefix=/usr).
This is true even if --prefix=/usr.
Andreas.
--
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510 2552 DF73 E780 A9DA AEC1
"And now for something completely different."
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH v2] elf: Install a symbolic link to ld.so as /usr/bin/ld.so
2021-11-23 16:19 ` Andreas Schwab
@ 2021-11-23 16:38 ` Florian Weimer
2021-11-24 17:00 ` Andreas Schwab
0 siblings, 1 reply; 9+ messages in thread
From: Florian Weimer @ 2021-11-23 16:38 UTC (permalink / raw)
To: Andreas Schwab; +Cc: Florian Weimer via Libc-alpha
* Andreas Schwab:
> On Nov 15 2021, Florian Weimer via Libc-alpha wrote:
>
>> This makes ld.so features such as --preload, --audit,
>> and --list-diagnostics more accessible to end users because they
>> do not need to know the ABI name of the dynamic loader.
>
> Ok.
>
>> diff --git a/NEWS b/NEWS
>> index f10971b180..2f56f3db28 100644
>> --- a/NEWS
>> +++ b/NEWS
>> @@ -68,6 +68,10 @@ Major new features:
>> to be used by compilers for optimizing usage of 'memcmp' when its
>> return value is only used for its boolean status.
>>
>> +* A symbolic link to the dynamic linker is now installed under
>> + /usr/bin/ld.so (or ${bindir}/ld.so if glibc is not configured with
>> + --prefix=/usr).
>
> This is true even if --prefix=/usr.
I think there is value in mentioning the string /usr/bin/ld.so because
it's what users will say. So perhaps this?
+* A symbolic link to the dynamic linker is now installed under
+ ${bindir}/ld.so (that is, /usr/bin/ld.so if glibc has been configured
+ with --prefix=/usr).
Do you have an opinion on adding the symbolic link?
Thanks,
Florian
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH v2] elf: Install a symbolic link to ld.so as /usr/bin/ld.so
2021-11-23 16:38 ` Florian Weimer
@ 2021-11-24 17:00 ` Andreas Schwab
2021-12-03 14:05 ` Florian Weimer
0 siblings, 1 reply; 9+ messages in thread
From: Andreas Schwab @ 2021-11-24 17:00 UTC (permalink / raw)
To: Florian Weimer; +Cc: Florian Weimer via Libc-alpha
On Nov 23 2021, Florian Weimer wrote:
> I think there is value in mentioning the string /usr/bin/ld.so because
> it's what users will say. So perhaps this?
Perhaps use a similar wording as the previous occasion.
> Do you have an opinion on adding the symbolic link?
See above.
Andreas.
--
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510 2552 DF73 E780 A9DA AEC1
"And now for something completely different."
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH v2] elf: Install a symbolic link to ld.so as /usr/bin/ld.so
2021-11-24 17:00 ` Andreas Schwab
@ 2021-12-03 14:05 ` Florian Weimer
2021-12-06 17:19 ` Andreas Schwab
0 siblings, 1 reply; 9+ messages in thread
From: Florian Weimer @ 2021-12-03 14:05 UTC (permalink / raw)
To: Andreas Schwab; +Cc: Florian Weimer via Libc-alpha
* Andreas Schwab:
> On Nov 23 2021, Florian Weimer wrote:
>
>> I think there is value in mentioning the string /usr/bin/ld.so because
>> it's what users will say. So perhaps this?
>
> Perhaps use a similar wording as the previous occasion.
>
>> Do you have an opinion on adding the symbolic link?
>
> See above.
Sorry, I can't find the previous occasion you are referring to. Would
you please provide an explicit pointer?
Thanks,
Florian
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH v2] elf: Install a symbolic link to ld.so as /usr/bin/ld.so
2021-11-15 19:07 [PATCH v2] elf: Install a symbolic link to ld.so as /usr/bin/ld.so Florian Weimer
2021-11-23 15:56 ` Florian Weimer
2021-11-23 16:19 ` Andreas Schwab
@ 2021-12-04 19:12 ` Florian Weimer
2021-12-05 21:36 ` Michael Hudson-Doyle
2 siblings, 1 reply; 9+ messages in thread
From: Florian Weimer @ 2021-12-04 19:12 UTC (permalink / raw)
To: Florian Weimer via Libc-alpha
* Florian Weimer via Libc-alpha:
> This makes ld.so features such as --preload, --audit,
> and --list-diagnostics more accessible to end users because they
> do not need to know the ABI name of the dynamic loader.
>
> ---
> v2: Use $(make-link).
> NEWS | 4 ++++
> elf/Makefile | 7 ++++++-
> 2 files changed, 10 insertions(+), 1 deletion(-)
>
> diff --git a/NEWS b/NEWS
> index f10971b180..2f56f3db28 100644
> --- a/NEWS
> +++ b/NEWS
> @@ -68,6 +68,10 @@ Major new features:
> to be used by compilers for optimizing usage of 'memcmp' when its
> return value is only used for its boolean status.
>
> +* A symbolic link to the dynamic linker is now installed under
> + /usr/bin/ld.so (or ${bindir}/ld.so if glibc is not configured with
> + --prefix=/usr).
Some distribution discussions on this patch:
/usr/bin/ld.so as a symbolic link for the dynamic loader
<https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/thread/SA244MNX5CC5OED65SX3QNCLKDUKW7D3/>
<https://lists.debian.org/debian-glibc/2021/12/msg00001.html>
<https://lists.debian.org/debian-devel/2021/12/msg00032.html>
(thread wasn't Cc:ed to both lists throughout)
Based on the Debian feedback, I've fixed launching of statically linked
executables:
[PATCH] elf: execve statically linked programs instead of crashing [BZ #28648]
<https://sourceware.org/pipermail/libc-alpha/2021-December/133615.html>
Thanks,
Florian
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH v2] elf: Install a symbolic link to ld.so as /usr/bin/ld.so
2021-12-04 19:12 ` Florian Weimer
@ 2021-12-05 21:36 ` Michael Hudson-Doyle
0 siblings, 0 replies; 9+ messages in thread
From: Michael Hudson-Doyle @ 2021-12-05 21:36 UTC (permalink / raw)
To: Florian Weimer; +Cc: Florian Weimer via Libc-alpha
On Sun, 5 Dec 2021 at 08:13, Florian Weimer via Libc-alpha <
libc-alpha@sourceware.org> wrote:
>
> Some distribution discussions on this patch:
>
> /usr/bin/ld.so as a symbolic link for the dynamic loader
>
> <
> https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/thread/SA244MNX5CC5OED65SX3QNCLKDUKW7D3/
> >
>
> <https://lists.debian.org/debian-glibc/2021/12/msg00001.html>
> <https://lists.debian.org/debian-devel/2021/12/msg00032.html>
> (thread wasn't Cc:ed to both lists throughout)
I think this is a good idea although I haven't thought incredibly hard
about it. I agree with Lennart that being able to readlink /usr/bin/ld.so
to get the default native dynamic linker path would be useful (although
there are probably other ways to meet that need).
Cheers,
mwh
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH v2] elf: Install a symbolic link to ld.so as /usr/bin/ld.so
2021-12-03 14:05 ` Florian Weimer
@ 2021-12-06 17:19 ` Andreas Schwab
0 siblings, 0 replies; 9+ messages in thread
From: Andreas Schwab @ 2021-12-06 17:19 UTC (permalink / raw)
To: Florian Weimer; +Cc: Florian Weimer via Libc-alpha
See commit 141e4030d6:
+* The standard location for the file that says what the local timezone is
+ has changed again. It is now `/usr/local/etc/localtime' (or more
+ precisely, `${prefix}/etc/localtime') rather than `/etc/localtime'.
Andreas.
--
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510 2552 DF73 E780 A9DA AEC1
"And now for something completely different."
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2021-12-06 17:19 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-15 19:07 [PATCH v2] elf: Install a symbolic link to ld.so as /usr/bin/ld.so Florian Weimer
2021-11-23 15:56 ` Florian Weimer
2021-11-23 16:19 ` Andreas Schwab
2021-11-23 16:38 ` Florian Weimer
2021-11-24 17:00 ` Andreas Schwab
2021-12-03 14:05 ` Florian Weimer
2021-12-06 17:19 ` Andreas Schwab
2021-12-04 19:12 ` Florian Weimer
2021-12-05 21:36 ` Michael Hudson-Doyle
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).