]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
aarch64: morello: elf: drop unused load address computation
authorSzabolcs Nagy <szabolcs.nagy@arm.com>
Thu, 8 Sep 2022 13:57:20 +0000 (14:57 +0100)
committerSzabolcs Nagy <szabolcs.nagy@arm.com>
Wed, 12 Oct 2022 13:22:03 +0000 (14:22 +0100)
l_addr is no longer a capability so this is not needed.

sysdeps/aarch64/morello/dl-machine.h

index 5169a48fce027ab5d486c1f96b8fc51b9937fbaa..0f681b19255cd54914687a777c70e36c6792f197 100644 (file)
@@ -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");