diff mbox series

dlinfo.3: Document the RTLD_DI_PHDR request

Message ID 87jzg1p1ay.fsf@oldenburg.str.redhat.com
State New
Headers show
Series dlinfo.3: Document the RTLD_DI_PHDR request | expand

Commit Message

Florian Weimer Aug. 28, 2024, 7:13 a.m. UTC
First added in glibc 2.36, backported upstream to glibc 2.34,
so mention 2.34.1 for the first version.

Signed-off-by: Florian Weimer <fweimer@redhat.com>

---
 man/man3/dlinfo.3 | 15 ++++++++++++++-
 1 file changed, 14 insertions(+), 1 deletion(-)


base-commit: 6a7f1461b0e5474d50ef1920558dec103c0c058f

Comments

Alejandro Colomar Aug. 28, 2024, 10:42 a.m. UTC | #1
Hi Florian,

On Wed, Aug 28, 2024 at 09:13:41AM GMT, Florian Weimer wrote:
> First added in glibc 2.36, backported upstream to glibc 2.34,
> so mention 2.34.1 for the first version.
> 
> Signed-off-by: Florian Weimer <fweimer@redhat.com>
> 
> ---
>  man/man3/dlinfo.3 | 15 ++++++++++++++-
>  1 file changed, 14 insertions(+), 1 deletion(-)
> 
> diff --git a/man/man3/dlinfo.3 b/man/man3/dlinfo.3
> index 84b696f8c..8d61f81e8 100644
> --- a/man/man3/dlinfo.3
> +++ b/man/man3/dlinfo.3
> @@ -194,10 +194,23 @@ If this object does not define a PT_TLS segment,
>  or if the calling thread has not allocated a block for it,
>  NULL is placed in
>  .IR *info .
> +.TP
> +.BR RTLD_DI_PHDR " (\fIconst ElfW(Phdr *)\fP, since glibc 2.34.1)"
> +.\" glibc commit d056c212130280c0a54d9a4f72170ec621b70ce5 (2.36)
> +.\" glibc commit d056c212130280c0a54d9a4f72170ec621b70ce5 (2.35)
> +.\" glibc commit 91c2e6c3db44297bf4cb3a2e3c40236c5b6a0b23 (2.34)

I think the two above should say 2.35.1 and 2.34.1.  (I'm assuming it's
2.35.1, can you confirm?)

Have a lovely day!
Alex

> +Obtain the address of this shared object's program header and place it
> +in
> +.IR *info .
> +This
> +.B dlinfo
> +call returns the number of program headers in the shared object.
>  .SH RETURN VALUE
>  On success,
>  .BR dlinfo ()
> -returns 0.
> +returns 0
> +(if not specified explicitly),
> +or a positive value corresponding to the request.
>  On failure, it returns \-1; the error can be diagnosed using
>  .BR dlerror (3).
>  .SH ATTRIBUTES
> 
> base-commit: 6a7f1461b0e5474d50ef1920558dec103c0c058f
>
Florian Weimer Aug. 28, 2024, 10:59 a.m. UTC | #2
* Alejandro Colomar:

> On Wed, Aug 28, 2024 at 09:13:41AM GMT, Florian Weimer wrote:
>> First added in glibc 2.36, backported upstream to glibc 2.34,
>> so mention 2.34.1 for the first version.
>> 
>> Signed-off-by: Florian Weimer <fweimer@redhat.com>
>> 
>> ---
>>  man/man3/dlinfo.3 | 15 ++++++++++++++-
>>  1 file changed, 14 insertions(+), 1 deletion(-)
>> 
>> diff --git a/man/man3/dlinfo.3 b/man/man3/dlinfo.3
>> index 84b696f8c..8d61f81e8 100644
>> --- a/man/man3/dlinfo.3
>> +++ b/man/man3/dlinfo.3
>> @@ -194,10 +194,23 @@ If this object does not define a PT_TLS segment,
>>  or if the calling thread has not allocated a block for it,
>>  NULL is placed in
>>  .IR *info .
>> +.TP
>> +.BR RTLD_DI_PHDR " (\fIconst ElfW(Phdr *)\fP, since glibc 2.34.1)"
>> +.\" glibc commit d056c212130280c0a54d9a4f72170ec621b70ce5 (2.36)
>> +.\" glibc commit d056c212130280c0a54d9a4f72170ec621b70ce5 (2.35)
>> +.\" glibc commit 91c2e6c3db44297bf4cb3a2e3c40236c5b6a0b23 (2.34)
>
> I think the two above should say 2.35.1 and 2.34.1.  (I'm assuming it's
> 2.35.1, can you confirm?)

Sure, will re-check and fix as appropriate.

Thanks,
Florian
diff mbox series

Patch

diff --git a/man/man3/dlinfo.3 b/man/man3/dlinfo.3
index 84b696f8c..8d61f81e8 100644
--- a/man/man3/dlinfo.3
+++ b/man/man3/dlinfo.3
@@ -194,10 +194,23 @@  If this object does not define a PT_TLS segment,
 or if the calling thread has not allocated a block for it,
 NULL is placed in
 .IR *info .
+.TP
+.BR RTLD_DI_PHDR " (\fIconst ElfW(Phdr *)\fP, since glibc 2.34.1)"
+.\" glibc commit d056c212130280c0a54d9a4f72170ec621b70ce5 (2.36)
+.\" glibc commit d056c212130280c0a54d9a4f72170ec621b70ce5 (2.35)
+.\" glibc commit 91c2e6c3db44297bf4cb3a2e3c40236c5b6a0b23 (2.34)
+Obtain the address of this shared object's program header and place it
+in
+.IR *info .
+This
+.B dlinfo
+call returns the number of program headers in the shared object.
 .SH RETURN VALUE
 On success,
 .BR dlinfo ()
-returns 0.
+returns 0
+(if not specified explicitly),
+or a positive value corresponding to the request.
 On failure, it returns \-1; the error can be diagnosed using
 .BR dlerror (3).
 .SH ATTRIBUTES