From d3acae5682b8b6fd23ed5767e696e6c3fcb775c4 Mon Sep 17 00:00:00 2001 From: Jonathan Wakely Date: Tue, 28 Oct 2014 14:47:19 +0100 Subject: [PATCH] ld.so.8: Correct documentation of $ORIGIN As noted by Siddhesh: 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 This 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. See http://stackoverflow.com/questions/26280738/what-is-the-equivalent-of-loader-path-for-rpath-specification-on-linux/26281226#26281226 Reported-by: Siddhesh Poyarekar Signed-off-by: Michael Kerrisk --- man8/ld.so.8 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/man8/ld.so.8 b/man8/ld.so.8 index 5342aa533..7f38d7ea2 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 shared library. Thus, an application located in .I somedir/app could be compiled with