public inbox for glibc-cvs@sourceware.org
help / color / mirror / Atom feed
* [glibc/arm/morello/main] aarch64: morello: elf: drop unused load address computation
@ 2022-10-12 14:18 Szabolcs Nagy
0 siblings, 0 replies; only message in thread
From: Szabolcs Nagy @ 2022-10-12 14:18 UTC (permalink / raw)
To: glibc-cvs
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=66e78c5b74e77d85c5d58908949c0d02ff00bf28
commit 66e78c5b74e77d85c5d58908949c0d02ff00bf28
Author: Szabolcs Nagy <szabolcs.nagy@arm.com>
Date: Thu Sep 8 14:57:20 2022 +0100
aarch64: morello: elf: drop unused load address computation
l_addr is no longer a capability so this is not needed.
Diff:
---
sysdeps/aarch64/morello/dl-machine.h | 41 ------------------------------------
1 file changed, 41 deletions(-)
diff --git a/sysdeps/aarch64/morello/dl-machine.h b/sysdeps/aarch64/morello/dl-machine.h
index 5169a48fce..0f681b1925 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");
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2022-10-12 14:18 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-12 14:18 [glibc/arm/morello/main] aarch64: morello: elf: drop unused load address computation Szabolcs Nagy
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).