diff options
author | Szabolcs Nagy <szabolcs.nagy@arm.com> | 2022-09-08 14:57:20 +0100 |
---|---|---|
committer | Szabolcs Nagy <szabolcs.nagy@arm.com> | 2022-10-12 14:22:03 +0100 |
commit | 66e78c5b74e77d85c5d58908949c0d02ff00bf28 (patch) | |
tree | b69af0ecf059e2a50a85ac1df9f959ff850d3760 | |
parent | 4d7cf069eea6761b9ffceaac6a8be2ad970f4413 (diff) | |
download | glibc-66e78c5b74e77d85c5d58908949c0d02ff00bf28.zip glibc-66e78c5b74e77d85c5d58908949c0d02ff00bf28.tar.gz glibc-66e78c5b74e77d85c5d58908949c0d02ff00bf28.tar.bz2 |
aarch64: morello: elf: drop unused load address computation
l_addr is no longer a capability so this is not needed.
-rw-r--r-- | sysdeps/aarch64/morello/dl-machine.h | 41 |
1 files changed, 0 insertions, 41 deletions
diff --git a/sysdeps/aarch64/morello/dl-machine.h b/sysdeps/aarch64/morello/dl-machine.h index 5169a48..0f681b1 100644 --- a/sysdeps/aarch64/morello/dl-machine.h +++ b/sysdeps/aarch64/morello/dl-machine.h @@ -173,47 +173,6 @@ elf_machine_rtld_base_setup (struct link_map *map, void *args) } } -/* Load address of the dynamic linker with correct bounds. */ -static uintptr_t __attribute__ ((unused)) -elf_machine_load_address_from_args (void *arg) -{ - uintptr_t *sp; - long argc; - uintptr_t phdr = 0; - size_t phentsize = sizeof (ElfW(Phdr)); - size_t phnum = 0; - - sp = arg; - argc = sp[0]; - /* Skip argv. */ - sp += argc + 2; - /* Skip environ. */ - for (; *sp; sp++); - sp++; - for (; *sp != AT_NULL; sp += 2) - { - long t = sp[0]; - if (t == AT_BASE && sp[1]) - return sp[1]; - else if (t == AT_PHDR) - phdr = sp[1]; - else if (t == AT_PHNUM) - phnum = sp[1]; - else if (t == AT_PHENT) - phentsize = sp[1]; - } - for (size_t i = 0; i < phnum; i++) - { - ElfW(Phdr) *p = (ElfW(Phdr) *)(phdr + i * phentsize); - if (p->p_type == PT_PHDR) - return phdr - p->p_vaddr; - if (p->p_type == PT_DYNAMIC) - return (uintptr_t) elf_machine_runtime_dynamic () - p->p_vaddr; - } - /* Fail. */ - return 0; -} - /* In elf/rtld.c _dl_start should be global so dl-start.S can reference it. */ #define RTLD_START asm (".globl _dl_start"); |