aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Baldwin <jhb@FreeBSD.org>2026-07-29 18:38:08 +0000
committerJohn Baldwin <jhb@FreeBSD.org>2026-07-29 18:38:08 +0000
commitec73badfbc2e08928d917924af491c07e1f39a09 (patch)
tree66b17045ec822c762cea4d3f0b737aead3b75db7
parentb9ea73ceb35c54f46be558493537743784797f4d (diff)
rtld: Remove write-only text_end local variable from map_object
Reviewed by: kib Fixes: 561991144e42 ("Remove Obj_Entry textsize member.") Sponsored by: AFRL, DARPA Differential Revision: https://reviews.freebsd.org/D58522
-rw-r--r--libexec/rtld-elf/map_object.c7
1 files changed, 0 insertions, 7 deletions
diff --git a/libexec/rtld-elf/map_object.c b/libexec/rtld-elf/map_object.c
index 0b4e847f407e..6f8160e003d7 100644
--- a/libexec/rtld-elf/map_object.c
+++ b/libexec/rtld-elf/map_object.c
@@ -94,7 +94,6 @@ map_object(int fd, const char *path, const struct stat *sb, bool ismain)
Elf_Addr note_end;
char *note_map;
size_t note_map_len;
- Elf_Addr text_end;
hdr = get_elf_header(fd, path, sb, &phdr);
if (hdr == NULL)
@@ -115,7 +114,6 @@ map_object(int fd, const char *path, const struct stat *sb, bool ismain)
note_map_len = 0;
segs = xcalloc(hdr->e_phnum, sizeof(segs[0]));
stack_flags = PF_X | PF_R | PF_W;
- text_end = 0;
while (phdr < phlimit) {
switch (phdr->p_type) {
case PT_INTERP:
@@ -130,11 +128,6 @@ map_object(int fd, const char *path, const struct stat *sb, bool ismain)
path, nsegs);
goto error;
}
- if ((segs[nsegs]->p_flags & PF_X) == PF_X) {
- text_end = MAX(text_end,
- rtld_round_page(segs[nsegs]->p_vaddr +
- segs[nsegs]->p_memsz));
- }
break;
case PT_PHDR: