From: Szabolcs Nagy Date: Thu, 8 Sep 2022 13:57:20 +0000 (+0100) Subject: aarch64: morello: elf: drop unused load address computation X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=66e78c5b74e77d85c5d58908949c0d02ff00bf28;p=thirdparty%2Fglibc.git aarch64: morello: elf: drop unused load address computation l_addr is no longer a capability so this is not needed. --- diff --git a/sysdeps/aarch64/morello/dl-machine.h b/sysdeps/aarch64/morello/dl-machine.h index 5169a48fce0..0f681b19255 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");