about summary refs log tree commit diff
path: root/elf/rtld.c
diff options
context:
space:
mode:
authorFlorian Weimer <fweimer@redhat.com>2023-09-08 13:02:06 +0200
committerFlorian Weimer <fweimer@redhat.com>2023-09-08 18:39:20 +0200
commit53df2ce6885da3d0e89e87dca7b095622296014f (patch)
tree6b7db1b4af022e0eb002f92e5891055f230d47f3 /elf/rtld.c
parent6985865bc3ad5b23147ee73466583dd7fdf65892 (diff)
downloadglibc-53df2ce6885da3d0e89e87dca7b095622296014f.tar.gz
glibc-53df2ce6885da3d0e89e87dca7b095622296014f.tar.xz
glibc-53df2ce6885da3d0e89e87dca7b095622296014f.zip
elf: Remove unused l_text_end field from struct link_map
It is a left-over from commit 52a01100ad011293197637e42b5be1a479a2
("elf: Remove ad-hoc restrictions on dlopen callers [BZ #22787]").

When backporting commmit 6985865bc3ad5b23147ee73466583dd7fdf65892
("elf: Always call destructors in reverse constructor order
(bug 30785)"), we can move the l_init_called_next field to this
place, so that the internal GLIBC_PRIVATE ABI does not change.

Reviewed-by: Carlos O'Donell <carlos@redhat.com>
Tested-by: Carlos O'Donell <carlos@redhat.com>
Diffstat (limited to 'elf/rtld.c')
-rw-r--r--elf/rtld.c6
1 files changed, 0 insertions, 6 deletions
diff --git a/elf/rtld.c b/elf/rtld.c
index a91e2a4471..5107d16fe3 100644
--- a/elf/rtld.c
+++ b/elf/rtld.c
@@ -477,7 +477,6 @@ _dl_start_final (void *arg, struct dl_start_final_info *info)
   GL(dl_rtld_map).l_real = &GL(dl_rtld_map);
   GL(dl_rtld_map).l_map_start = (ElfW(Addr)) &__ehdr_start;
   GL(dl_rtld_map).l_map_end = (ElfW(Addr)) _end;
-  GL(dl_rtld_map).l_text_end = (ElfW(Addr)) _etext;
   /* Copy the TLS related data if necessary.  */
 #ifndef DONT_USE_BOOTSTRAP_MAP
 # if NO_TLS_OFFSET != 0
@@ -1119,7 +1118,6 @@ rtld_setup_main_map (struct link_map *main_map)
   bool has_interp = false;
 
   main_map->l_map_end = 0;
-  main_map->l_text_end = 0;
   /* Perhaps the executable has no PT_LOAD header entries at all.  */
   main_map->l_map_start = ~0;
   /* And it was opened directly.  */
@@ -1211,8 +1209,6 @@ rtld_setup_main_map (struct link_map *main_map)
 	  allocend = main_map->l_addr + ph->p_vaddr + ph->p_memsz;
 	  if (main_map->l_map_end < allocend)
 	    main_map->l_map_end = allocend;
-	  if ((ph->p_flags & PF_X) && allocend > main_map->l_text_end)
-	    main_map->l_text_end = allocend;
 
 	  /* The next expected address is the page following this load
 	     segment.  */
@@ -1272,8 +1268,6 @@ rtld_setup_main_map (struct link_map *main_map)
       = (char *) main_map->l_tls_initimage + main_map->l_addr;
   if (! main_map->l_map_end)
     main_map->l_map_end = ~0;
-  if (! main_map->l_text_end)
-    main_map->l_text_end = ~0;
   if (! GL(dl_rtld_map).l_libname && GL(dl_rtld_map).l_name)
     {
       /* We were invoked directly, so the program might not have a