about summary refs log tree commit diff
path: root/elf/dl-load.h
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/dl-load.h
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/dl-load.h')
-rw-r--r--elf/dl-load.h7
1 files changed, 2 insertions, 5 deletions
diff --git a/elf/dl-load.h b/elf/dl-load.h
index ecf6910c68..1d5207694b 100644
--- a/elf/dl-load.h
+++ b/elf/dl-load.h
@@ -83,14 +83,11 @@ struct loadcmd
 
 /* This is a subroutine of _dl_map_segments.  It should be called for each
    load command, some time after L->l_addr has been set correctly.  It is
-   responsible for setting up the l_text_end and l_phdr fields.  */
+   responsible for setting the l_phdr fields  */
 static __always_inline void
 _dl_postprocess_loadcmd (struct link_map *l, const ElfW(Ehdr) *header,
                          const struct loadcmd *c)
 {
-  if (c->prot & PROT_EXEC)
-    l->l_text_end = l->l_addr + c->mapend;
-
   if (l->l_phdr == 0
       && c->mapoff <= header->e_phoff
       && ((size_t) (c->mapend - c->mapstart + c->mapoff)
@@ -103,7 +100,7 @@ _dl_postprocess_loadcmd (struct link_map *l, const ElfW(Ehdr) *header,
 
 /* This is a subroutine of _dl_map_object_from_fd.  It is responsible
    for filling in several fields in *L: l_map_start, l_map_end, l_addr,
-   l_contiguous, l_text_end, l_phdr.  On successful return, all the
+   l_contiguous, l_phdr.  On successful return, all the
    segments are mapped (or copied, or whatever) from the file into their
    final places in the address space, with the correct page permissions,
    and any bss-like regions already zeroed.  It returns a null pointer