This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: Error in documentation of $ORIGIN in the ld.so man page
- From: Jonathan Wakely <jwakely at redhat dot com>
- To: Siddhesh Poyarekar <siddhesh dot poyarekar at gmail dot com>
- Cc: Michael Kerrisk-manpages <mtk dot manpages at gmail dot com>, GNU C Library <libc-alpha at sourceware dot org>, carlos at redhat dot com
- Date: Thu, 9 Oct 2014 19:19:52 +0100
- Subject: Re: Error in documentation of $ORIGIN in the ld.so man page
- Authentication-results: sourceware.org; auth=none
- References: <CAAHN_R0=P=ZxXhGcEMgr60zmH+sh29mg57dm8ccfo82+EyZqhg at mail dot gmail dot com>
On 09/10/14 23:18 +0530, Siddhesh Poyarekar wrote:
Hi Michael,
The ld.so man page says:
$ORIGIN (or equivalently ${ORIGIN})
This expands to the directory containing the application
executable. Thus, an application located in somedir/app could be
compiled with
which is incorrect since it expands to the directory containing the
DSO and not the application executable. This seems like deliberate
behaviour in dl-object.c, so it needs to be fixed in the man page.
Credit goes to Jon Wakely for finding this[1].
Thanks, Siddhesh, I was just preparing this suggested patch.
diff --git a/man8/ld.so.8 b/man8/ld.so.8
index a5a7293..ac02df6 100644
--- a/man8/ld.so.8
+++ b/man8/ld.so.8
@@ -92,7 +92,7 @@ understands certain strings in an rpath specification (DT_RPATH or DT_RUNPATH);
.TP
.IR $ORIGIN " (or equivalently " ${ORIGIN} )
This expands to
-the directory containing the application executable.
+the directory containing the program or library.
Thus, an application located in
.I somedir/app
could be compiled with