From feffdb431ff985b4c0138f777ad638287a8cf8d6 Mon Sep 17 00:00:00 2001 From: Lukas Javorsky Date: Fri, 13 Sep 2024 09:09:39 +0000 Subject: [PATCH] Add RTLD_DI_PHDR to dlinfo(3) Resolves: RHEL-53953 --- ....3-Document-the-RTLD_DI_PHDR-request.patch | 44 +++++++++++++++++++ man-pages.spec | 11 ++++- 2 files changed, 54 insertions(+), 1 deletion(-) create mode 100644 0001-dlinfo.3-Document-the-RTLD_DI_PHDR-request.patch diff --git a/0001-dlinfo.3-Document-the-RTLD_DI_PHDR-request.patch b/0001-dlinfo.3-Document-the-RTLD_DI_PHDR-request.patch new file mode 100644 index 0000000..9aa9726 --- /dev/null +++ b/0001-dlinfo.3-Document-the-RTLD_DI_PHDR-request.patch @@ -0,0 +1,44 @@ +From f1016b60769174da8e396e30fd25f58bb58d4232 Mon Sep 17 00:00:00 2001 +From: Florian Weimer +Date: Wed, 28 Aug 2024 13:01:56 +0200 +Subject: [PATCH] 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. + +Signed-off-by: Florian Weimer +Message-ID: <87o75chpwb.fsf@oldenburg.str.redhat.com> +Signed-off-by: Alejandro Colomar +--- + man/man3/dlinfo.3 | 15 ++++++++++++++- + 1 file changed, 14 insertions(+), 1 deletion(-) + +diff --git a/man3/dlinfo.3 b/man3/dlinfo.3 +index bc331dc..a77e514 100644 +--- a/man3/dlinfo.3 ++++ b/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 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 cause of the error can be diagnosed using + .BR dlerror (3). + .SH ATTRIBUTES diff --git a/man-pages.spec b/man-pages.spec index 850423b..072cb9a 100644 --- a/man-pages.spec +++ b/man-pages.spec @@ -8,7 +8,7 @@ Summary: Linux kernel and C library user-space interface documentation Name: man-pages Version: 6.04 -Release: 1%{?dist} +Release: 2%{?dist} # List of licenses with examples of man-pages using them # BSD-2-Clause: man-pages/man5/elf.5 # BSD-3-Clause: man-pages/man3/list.3 @@ -58,6 +58,10 @@ BuildArch: noarch # https://bugzilla.kernel.org/show_bug.cgi?id=53781 Patch21: man-pages-3.42-close.patch +# Upstream commit: https://git.kernel.org/pub/scm/docs/man-pages/man-pages.git/commit/?id=f1016b60769174da8e396e30fd25f58bb58d4232 +# Resolves: RHEL-53953 +Patch22: 0001-dlinfo.3-Document-the-RTLD_DI_PHDR-request.patch + %description A large collection of manual pages from the Linux Documentation Project (LDP). @@ -65,6 +69,7 @@ A large collection of manual pages from the Linux Documentation Project (LDP). %setup -q -a 1 -a 2 %patch21 -p1 +%patch22 -p1 # rename posix README so we don't have conflict mv %{posix_name}/README %{posix_name}/%{posix_name_rel}.README @@ -130,6 +135,10 @@ fi %{_mandir}/man*/* %changelog +* Fri Sep 13 2024 Lukas Javorsky - 6.04-2 +- Add RTLD_DI_PHDR to dlinfo(3) +- Resolves: RHEL-53953 + * Thu Jul 13 2023 Lukas Javorsky - 6.04-1 - Rebase to 6.04 version per request from RHIVOS team - Resolves: RHEL-683