public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
* Error in documentation of $ORIGIN in the ld.so man page
@ 2014-10-09 17:48 Siddhesh Poyarekar
  2014-10-09 18:19 ` Jonathan Wakely
  0 siblings, 1 reply; 5+ messages in thread
From: Siddhesh Poyarekar @ 2014-10-09 17:48 UTC (permalink / raw)
  To: Michael Kerrisk-manpages; +Cc: jwakely, GNU C Library, carlos

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

[1] http://stackoverflow.com/questions/26280738/what-is-the-equivalent-of-loader-path-for-rpath-specification-on-linux/26281226#26281226

-- 
http://siddhesh.in

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Error in documentation of $ORIGIN in the ld.so man page
  2014-10-09 17:48 Error in documentation of $ORIGIN in the ld.so man page Siddhesh Poyarekar
@ 2014-10-09 18:19 ` Jonathan Wakely
  2014-10-28 13:47   ` Michael Kerrisk (man-pages)
  0 siblings, 1 reply; 5+ messages in thread
From: Jonathan Wakely @ 2014-10-09 18:19 UTC (permalink / raw)
  To: Siddhesh Poyarekar; +Cc: Michael Kerrisk-manpages, GNU C Library, carlos

[-- Attachment #1: Type: text/plain, Size: 612 bytes --]

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.



[-- Attachment #2: patch.txt --]
[-- Type: text/x-patch, Size: 452 bytes --]

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Error in documentation of $ORIGIN in the ld.so man page
  2014-10-09 18:19 ` Jonathan Wakely
@ 2014-10-28 13:47   ` Michael Kerrisk (man-pages)
  2014-10-28 14:09     ` Jonathan Wakely
  0 siblings, 1 reply; 5+ messages in thread
From: Michael Kerrisk (man-pages) @ 2014-10-28 13:47 UTC (permalink / raw)
  To: Jonathan Wakely, Siddhesh Poyarekar; +Cc: mtk.manpages, GNU C Library, carlos

Hello Jonathan and Siddesh,

Thanks for the patch and the report. 

I applied the patch. One question, below.

On 10/09/2014 08:19 PM, Jonathan Wakely wrote:
> 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.

I made this "...program or shared library". Okay?

Thanks,

Michael


>  Thus, an application located in
>  .I somedir/app
>  could be compiled with

-- 
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Linux/UNIX System Programming Training: http://man7.org/training/

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Error in documentation of $ORIGIN in the ld.so man page
  2014-10-28 13:47   ` Michael Kerrisk (man-pages)
@ 2014-10-28 14:09     ` Jonathan Wakely
  2014-10-28 14:11       ` Michael Kerrisk (man-pages)
  0 siblings, 1 reply; 5+ messages in thread
From: Jonathan Wakely @ 2014-10-28 14:09 UTC (permalink / raw)
  To: Michael Kerrisk (man-pages); +Cc: Siddhesh Poyarekar, GNU C Library, carlos

On 28/10/14 14:46 +0100, Michael Kerrisk (man-pages) wrote:
>Hello Jonathan and Siddesh,
>
>Thanks for the patch and the report.
>
>I applied the patch. One question, below.
>
>On 10/09/2014 08:19 PM, Jonathan Wakely wrote:
>> 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.
>
>I made this "...program or shared library". Okay?

Yes, I think that's an improvement.

I used "program or library" to match the first line of the SYNOPSIS
which uses the same wording, but there it says "some dynamically
linked program or library" which makes it clear it refers to
shared libraries. Your change makes the same thing clear in the
description of $ORIGIN.

Thanks,

Jonathan

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Error in documentation of $ORIGIN in the ld.so man page
  2014-10-28 14:09     ` Jonathan Wakely
@ 2014-10-28 14:11       ` Michael Kerrisk (man-pages)
  0 siblings, 0 replies; 5+ messages in thread
From: Michael Kerrisk (man-pages) @ 2014-10-28 14:11 UTC (permalink / raw)
  To: Jonathan Wakely; +Cc: Siddhesh Poyarekar, GNU C Library, Carlos O'Donell

On Tue, Oct 28, 2014 at 3:09 PM, Jonathan Wakely <jwakely@redhat.com> wrote:
> On 28/10/14 14:46 +0100, Michael Kerrisk (man-pages) wrote:
>>
>> Hello Jonathan and Siddesh,
>>
>> Thanks for the patch and the report.
>>
>> I applied the patch. One question, below.
>>
>> On 10/09/2014 08:19 PM, Jonathan Wakely wrote:
>>>
>>> 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.
>>
>>
>> I made this "...program or shared library". Okay?
>
>
> Yes, I think that's an improvement.
>
> I used "program or library" to match the first line of the SYNOPSIS
> which uses the same wording, but there it says "some dynamically
> linked program or library" which makes it clear it refers to
> shared libraries. Your change makes the same thing clear in the
> description of $ORIGIN.
>

Thanks, Jonathan.

Cheers,

Michael



-- 
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Linux/UNIX System Programming Training: http://man7.org/training/

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2014-10-28 14:11 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-10-09 17:48 Error in documentation of $ORIGIN in the ld.so man page Siddhesh Poyarekar
2014-10-09 18:19 ` Jonathan Wakely
2014-10-28 13:47   ` Michael Kerrisk (man-pages)
2014-10-28 14:09     ` Jonathan Wakely
2014-10-28 14:11       ` Michael Kerrisk (man-pages)

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).