* elf(5) and ld.so(8): DT_RPATH deprecated - really?
@ 2024-04-19 6:43 Joachim Wuttke
2024-04-22 4:35 ` Alejandro Colomar
0 siblings, 1 reply; 7+ messages in thread
From: Joachim Wuttke @ 2024-04-19 6:43 UTC (permalink / raw)
To: alx; +Cc: linux-man
[-- Attachment #1: Type: text/plain, Size: 282 bytes --]
Pages elf(5) and ld.so(8) say that DT_RPATH is deprecated.
This is inconsistent with ld(1), which does not warn that
--disable-new-dtags is deprecated.
And it is not credible. A huge amount of software would
break down if support for DT_RPATH were ever removed.
Regards, Joachim
[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 5918 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: elf(5) and ld.so(8): DT_RPATH deprecated - really?
2024-04-19 6:43 elf(5) and ld.so(8): DT_RPATH deprecated - really? Joachim Wuttke
@ 2024-04-22 4:35 ` Alejandro Colomar
2024-04-22 16:22 ` Joseph Myers
0 siblings, 1 reply; 7+ messages in thread
From: Alejandro Colomar @ 2024-04-22 4:35 UTC (permalink / raw)
To: Joachim Wuttke, bug-binutils; +Cc: linux-man, Mike Frysinger
[-- Attachment #1: Type: text/plain, Size: 2019 bytes --]
Hi Joachim,
On Fri, Apr 19, 2024 at 08:43:33AM +0200, Joachim Wuttke wrote:
> Pages elf(5) and ld.so(8) say that DT_RPATH is deprecated.
The blames are:
commit 28d979c8c7fbdca65e221eca4e21823735f5db8d
Author: Michael Kerrisk <mtk.manpages@gmail.com>
Date: Fri Jul 15 12:06:06 2005 +0000
Mike Frysinger <vapier@gentoo.org>
tweaked the short description to include definition of 'ELF'
add ELFOSABI_NONE to the ELFOSABI_ list
tweak/add more machines to EM_ list for ehdr->e_machine
fix indenting to be consistent
tweak the display of the ELF_ST_* macros
document the Elf_Dyn structure
and
commit 121edebe2e0b36c3cfc306fbf88bfb6d17993b63
Author: Krónos <Krónos@Sāturnus>
Date: Sun Dec 23 23:36:00 2001 +0100
man-pages 1.46
Link: <https://www.win.tue.nl/~aeb/ftpdocs/linux-local/manpages.archive/>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
I also found a few pages talking about it being deprecated:
<https://stackoverflow.com/questions/67131565/how-do-i-set-dt-rpath-or-dt-runpath>
<https://stackoverflow.com/questions/7967848/use-rpath-but-not-runpath>
> This is inconsistent with ld(1), which does not warn that
> --disable-new-dtags is deprecated.
I've added bug-binutils@ to the thread, in case they want to update
their manual to add a deprecation notice.
> And it is not credible. A huge amount of software would
> break down if support for DT_RPATH were ever removed.
Nobody said it would be removed soon. But it seems people want to
remove it "eventually", with that eventually possibly being in a couple
of centuries, if computers still exist.
But if you have the intention of using it in new software, or keeping it
in existing software, maybe you could give your reasons to those who
deprecated it, so that either you convince them of its usefulness, or
they convince you of not using it.
Have a locely day!
Alex
> Regards, Joachim
--
<https://www.alejandro-colomar.es/>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: elf(5) and ld.so(8): DT_RPATH deprecated - really?
2024-04-22 4:35 ` Alejandro Colomar
@ 2024-04-22 16:22 ` Joseph Myers
2024-04-22 17:58 ` Alejandro Colomar
0 siblings, 1 reply; 7+ messages in thread
From: Joseph Myers @ 2024-04-22 16:22 UTC (permalink / raw)
To: Alejandro Colomar; +Cc: Joachim Wuttke, bug-binutils, linux-man, Mike Frysinger
On Mon, 22 Apr 2024, Alejandro Colomar wrote:
> Nobody said it would be removed soon. But it seems people want to
> remove it "eventually", with that eventually possibly being in a couple
> of centuries, if computers still exist.
>
> But if you have the intention of using it in new software, or keeping it
> in existing software, maybe you could give your reasons to those who
> deprecated it, so that either you convince them of its usefulness, or
> they convince you of not using it.
DT_RPATH is just as useful as it always was for testing purposes, when
you're building binaries against a sysroot and use -rpath and
-dynamic-linker pointing to that sysroot, and you really do want the RPATH
used at runtime to find both direct and indirect dependencies and
DT_RUNPATH would *not* serve the same purpose (because the sysroot is
intended to have exactly the same binaries that would eventually be used
in the root filesystem of the target in production, it would not be
appropriate to set DT_RUNPATH in any of those binaries).
--
Joseph S. Myers
josmyers@redhat.com
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: elf(5) and ld.so(8): DT_RPATH deprecated - really?
2024-04-22 16:22 ` Joseph Myers
@ 2024-04-22 17:58 ` Alejandro Colomar
2024-04-22 21:08 ` Joachim Wuttke
2024-04-23 7:53 ` [patch] elf.5 and ld.so.8: undeprecate DT_RPATH; explain DT_RPATH vs DT_RUNPATH Joachim Wuttke
0 siblings, 2 replies; 7+ messages in thread
From: Alejandro Colomar @ 2024-04-22 17:58 UTC (permalink / raw)
To: Joseph Myers; +Cc: Joachim Wuttke, bug-binutils, linux-man, Mike Frysinger
[-- Attachment #1: Type: text/plain, Size: 1604 bytes --]
On Mon, Apr 22, 2024 at 04:22:13PM +0000, Joseph Myers wrote:
> On Mon, 22 Apr 2024, Alejandro Colomar wrote:
>
> > Nobody said it would be removed soon. But it seems people want to
> > remove it "eventually", with that eventually possibly being in a couple
> > of centuries, if computers still exist.
> >
> > But if you have the intention of using it in new software, or keeping it
> > in existing software, maybe you could give your reasons to those who
> > deprecated it, so that either you convince them of its usefulness, or
> > they convince you of not using it.
>
> DT_RPATH is just as useful as it always was for testing purposes, when
> you're building binaries against a sysroot and use -rpath and
> -dynamic-linker pointing to that sysroot, and you really do want the RPATH
> used at runtime to find both direct and indirect dependencies and
> DT_RUNPATH would *not* serve the same purpose (because the sysroot is
> intended to have exactly the same binaries that would eventually be used
> in the root filesystem of the target in production, it would not be
> appropriate to set DT_RUNPATH in any of those binaries).
Hi Joseph!
Then I guess we must undeprecate it. I'm fine with that, as long as the
maintainers of ld(1) agree. Joachim, would you mind sending a patch,
and CC binutils? I'll leave it a week or two to gather reviews, and if
nobody opposes, I'll merge it. I can also prepare the patch, if you
prefer.
Have a lovely day!
Alex
>
> --
> Joseph S. Myers
> josmyers@redhat.com
>
--
<https://www.alejandro-colomar.es/>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: elf(5) and ld.so(8): DT_RPATH deprecated - really?
2024-04-22 17:58 ` Alejandro Colomar
@ 2024-04-22 21:08 ` Joachim Wuttke
2024-04-23 7:53 ` [patch] elf.5 and ld.so.8: undeprecate DT_RPATH; explain DT_RPATH vs DT_RUNPATH Joachim Wuttke
1 sibling, 0 replies; 7+ messages in thread
From: Joachim Wuttke @ 2024-04-22 21:08 UTC (permalink / raw)
To: Alejandro Colomar, Joseph Myers; +Cc: bug-binutils, linux-man, Mike Frysinger
[-- Attachment #1: Type: text/plain, Size: 884 bytes --]
Hi Alex and all:
> But it seems people want to remove it "eventually" ...
> in a couple of centuries ...
Deprecation, in my understanding, requires a realistic
roadmap for change, and in particular there must be
a way to replace any legitimate use of the old facility
by a functionally equivalent new construct.
> if you have the intention of using it in new software,
> or keeping it in existing software, maybe you could
> give your reasons
In addition to what Joseph wrote:
> ... useful as it always was for testing purposes ...
We are using RPATH not only in testing, but also in
deployment, namely in binary installers where we
bundle our application's binary executable with
all direct and indirect shared library dependencies,
except the most basic system libraries.
> would you mind sending a patch, and CC binutils
I'll try tomorrow.
Kind greetings, Joachim
[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 5918 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* [patch] elf.5 and ld.so.8: undeprecate DT_RPATH; explain DT_RPATH vs DT_RUNPATH
2024-04-22 17:58 ` Alejandro Colomar
2024-04-22 21:08 ` Joachim Wuttke
@ 2024-04-23 7:53 ` Joachim Wuttke
2024-05-07 13:12 ` Alejandro Colomar
1 sibling, 1 reply; 7+ messages in thread
From: Joachim Wuttke @ 2024-04-23 7:53 UTC (permalink / raw)
To: Alejandro Colomar; +Cc: bug-binutils, linux-man, Mike Frysinger, Joseph Myers
[-- Attachment #1: Type: text/plain, Size: 1621 bytes --]
In elf.5 and ld.so.8, remove deprecation of DT_RPATH
In elf.5, amend the description of DT_RUNPATH and DT_RPATH.
Rationale:
There is no credible path towards removal of DT_RPATH.
Lots of software depend on DT_RPATH as is.
It is used e.g. for testing and in binary installers.
Signed-off-by: Joachim Wuttke <j.wuttke@fz-juelich.de>
---
man5/elf.5 | 4 ++--
man8/ld.so.8 | 1 -
2 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/man5/elf.5 b/man5/elf.5
index 9aff88afb..57136159c 100644
--- a/man5/elf.5
+++ b/man5/elf.5
@@ -1787,7 +1787,7 @@ Address of the termination function
String table offset to name of shared object
.TP
.B DT_RPATH
-String table offset to library search path (deprecated)
+String table offset to search path for direct and indirect library dependencies
.TP
.B DT_SYMBOLIC
Alert linker to search this shared object before the executable for symbols
@@ -1819,7 +1819,7 @@ Instruct dynamic linker to process all relocations before
transferring control to the executable
.TP
.B DT_RUNPATH
-String table offset to library search path
+String table offset to search path for direct library dependencies
.TP
.B DT_LOPROC
.TQ
diff --git a/man8/ld.so.8 b/man8/ld.so.8
index fa75b7820..23cddb9df 100644
--- a/man8/ld.so.8
+++ b/man8/ld.so.8
@@ -61,7 +61,6 @@ then it is searched for in the following order:
Using the directories specified in the
DT_RPATH dynamic section attribute
of the binary if present and DT_RUNPATH attribute does not exist.
-Use of DT_RPATH is deprecated.
.IP (2)
Using the environment variable
.BR LD_LIBRARY_PATH ,
--
2.43.0
[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 5918 bytes --]
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [patch] elf.5 and ld.so.8: undeprecate DT_RPATH; explain DT_RPATH vs DT_RUNPATH
2024-04-23 7:53 ` [patch] elf.5 and ld.so.8: undeprecate DT_RPATH; explain DT_RPATH vs DT_RUNPATH Joachim Wuttke
@ 2024-05-07 13:12 ` Alejandro Colomar
0 siblings, 0 replies; 7+ messages in thread
From: Alejandro Colomar @ 2024-05-07 13:12 UTC (permalink / raw)
To: Joachim Wuttke; +Cc: bug-binutils, linux-man, Mike Frysinger, Joseph Myers
[-- Attachment #1: Type: text/plain, Size: 2162 bytes --]
Hi Joachim,
On Tue, Apr 23, 2024 at 09:53:03AM +0200, Joachim Wuttke wrote:
> In elf.5 and ld.so.8, remove deprecation of DT_RPATH
> In elf.5, amend the description of DT_RUNPATH and DT_RPATH.
>
> Rationale:
> There is no credible path towards removal of DT_RPATH.
> Lots of software depend on DT_RPATH as is.
> It is used e.g. for testing and in binary installers.
>
> Signed-off-by: Joachim Wuttke <j.wuttke@fz-juelich.de>
Patch applied. Thanks!
<https://www.alejandro-colomar.es/src/alx/linux/man-pages/man-pages.git/commit/?h=contrib&id=5fe3738ffceec44fac809fd1acfd65e74b84ff93>
Have a lovely day!
Alex
> ---
> man5/elf.5 | 4 ++--
> man8/ld.so.8 | 1 -
> 2 files changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/man5/elf.5 b/man5/elf.5
> index 9aff88afb..57136159c 100644
> --- a/man5/elf.5
> +++ b/man5/elf.5
> @@ -1787,7 +1787,7 @@ Address of the termination function
> String table offset to name of shared object
> .TP
> .B DT_RPATH
> -String table offset to library search path (deprecated)
> +String table offset to search path for direct and indirect library dependencies
> .TP
> .B DT_SYMBOLIC
> Alert linker to search this shared object before the executable for symbols
> @@ -1819,7 +1819,7 @@ Instruct dynamic linker to process all relocations before
> transferring control to the executable
> .TP
> .B DT_RUNPATH
> -String table offset to library search path
> +String table offset to search path for direct library dependencies
> .TP
> .B DT_LOPROC
> .TQ
> diff --git a/man8/ld.so.8 b/man8/ld.so.8
> index fa75b7820..23cddb9df 100644
> --- a/man8/ld.so.8
> +++ b/man8/ld.so.8
> @@ -61,7 +61,6 @@ then it is searched for in the following order:
> Using the directories specified in the
> DT_RPATH dynamic section attribute
> of the binary if present and DT_RUNPATH attribute does not exist.
> -Use of DT_RPATH is deprecated.
> .IP (2)
> Using the environment variable
> .BR LD_LIBRARY_PATH ,
> --
> 2.43.0
>
--
<https://www.alejandro-colomar.es/>
A client is hiring kernel driver, mm, and/or crypto developers;
contact me if interested.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2024-05-07 13:12 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-04-19 6:43 elf(5) and ld.so(8): DT_RPATH deprecated - really? Joachim Wuttke
2024-04-22 4:35 ` Alejandro Colomar
2024-04-22 16:22 ` Joseph Myers
2024-04-22 17:58 ` Alejandro Colomar
2024-04-22 21:08 ` Joachim Wuttke
2024-04-23 7:53 ` [patch] elf.5 and ld.so.8: undeprecate DT_RPATH; explain DT_RPATH vs DT_RUNPATH Joachim Wuttke
2024-05-07 13:12 ` Alejandro Colomar
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox