dlinfo.3: Document the RTLD_DI_PHDR request
PATCH v2 1/1 dlinfo.3: Document the RTLD_DI_PHDR request
First added in glibc 2.36, backported upstream to glibc 2.34, so mention 2.34.1 for the first version.
---
v2: Fix commit IDs.
man/man3/dlinfo.3 | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-)
man/man3/dlinfo.3 +14 -1
@@ -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 28ea43f8d64f0dd1f2de75525157730e1532e600 (2.35.1) +.\" glibc commit 91c2e6c3db44297bf4cb3a2e3c40236c5b6a0b23 (2.34.1) +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
Alejandro Colomar
maintainerHi Florian,
Quoted 19 lines · Florian Weimer
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 <[email protected]>---
v2: Fix commit IDs.man/man3/dlinfo.3 | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-)man/man3/dlinfo.3 +1
-0@@ -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
man/man3/dlinfo.3 If this object does not define a PT_TLS segment, · line 207
Quoted 10 lines
man/man3/dlinfo.3 +10
-0+.BR RTLD_DI_PHDR " (\fIconst ElfW(Phdr *)\fP, since glibc 2.34.1)" +.\" glibc commit d056c212130280c0a54d9a4f72170ec621b70ce5 (2.36) +.\" glibc commit 28ea43f8d64f0dd1f2de75525157730e1532e600 (2.35.1) +.\" glibc commit 91c2e6c3db44297bf4cb3a2e3c40236c5b6a0b23 (2.34.1) +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.
Can that number be 0?
man/man3/dlinfo.3 If this object does not define a PT_TLS segment, · line 213
Quoted 7 lines
man/man3/dlinfo.3 +3
-1.SH RETURN VALUE On success, .BR dlinfo () -returns 0. +returns 0 +(if not specified explicitly), +or a positive value corresponding to the request.
If so, this should be nonnegative rather than positive.
Cheers,
Alex
Quoted 7 lines
man/man3/dlinfo.3 +0
-0On failure, it returns \-1; the error can be diagnosed using .BR dlerror (3). .SH ATTRIBUTESbase-commit:
6a7f1461b0e5474d50ef1920558dec103c0c058f
Signature · 1 line
<https://www.alejandro-colomar.es/>
* Alejandro Colomar:
Quoted 26 lines
Hi Florian,
Quoted 23 lines · Florian Weimer
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 <[email protected]>---
v2: Fix commit IDs.man/man3/dlinfo.3 | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-)man/man3/dlinfo.3 +5
-0@@ -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 28ea43f8d64f0dd1f2de75525157730e1532e600 (2.35.1) +.\" glibc commit 91c2e6c3db44297bf4cb3a2e3c40236c5b6a0b23 (2.34.1)
Quoted 8 lines
man/man3/dlinfo.3 If this object does not define a PT_TLS segment, · line 207
Quoted 6 lines
man/man3/dlinfo.3 +6
-0+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.Can that number be 0?
No, there has to be at least one PT_LOAD segment.
Thanks,
Florian
Alejandro Colomar
maintainerHi Florian,
Quoted 37 lines · Florian Weimer
* Alejandro Colomar:
Quoted 26 lines
Hi Florian,
Quoted 23 lines · Florian Weimer
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 <[email protected]>---
v2: Fix commit IDs.man/man3/dlinfo.3 | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-)man/man3/dlinfo.3 +5
-0@@ -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 28ea43f8d64f0dd1f2de75525157730e1532e600 (2.35.1) +.\" glibc commit 91c2e6c3db44297bf4cb3a2e3c40236c5b6a0b23 (2.34.1)Quoted 8 lines
man/man3/dlinfo.3 If this object does not define a PT_TLS segment, · line 207
Quoted 6 lines
man/man3/dlinfo.3 +6
-0+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.Can that number be 0?
Quoted 1 line
No, there has to be at least one
PT_LOADsegment.
Thanks! I've applied the patch.
Cheers,
Alex
Quoted 4 lines
Thanks,
Florian
Signature · 1 line
<https://www.alejandro-colomar.es/>