[PATCH 03/13] elf: dont pass fd to _dl_process_pt_xx

Stas Sergeev stsp2@yandex.ru
Sat Mar 18 16:51:00 GMT 2023


It is not used in these functions.
rtld.c:rtld_setup_main_map() does the same.

The test-suite was run on x86_64/64 and showed no regressions.

Signed-off-by: Stas Sergeev <stsp2@yandex.ru>
---
 elf/dl-load.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/elf/dl-load.c b/elf/dl-load.c
index fcb39a78d4..ab8b648687 100644
--- a/elf/dl-load.c
+++ b/elf/dl-load.c
@@ -1379,10 +1379,10 @@ cannot enable executable stack as shared object requires");
     switch (ph[-1].p_type)
       {
       case PT_NOTE:
-	_dl_process_pt_note (l, fd, &ph[-1]);
+	_dl_process_pt_note (l, -1, &ph[-1]);
 	break;
       case PT_GNU_PROPERTY:
-	_dl_process_pt_gnu_property (l, fd, &ph[-1]);
+	_dl_process_pt_gnu_property (l, -1, &ph[-1]);
 	break;
       }
 
-- 
2.37.2



More information about the Libc-alpha mailing list