public inbox for glibc-cvs@sourceware.org help / color / mirror / Atom feed
From: Szabolcs Nagy <nsz@sourceware.org> To: glibc-cvs@sourceware.org Subject: [glibc/arm/morello/main] aarch64: morello: elf: drop unused load address computation Date: Wed, 12 Oct 2022 14:18:22 +0000 (GMT) [thread overview] Message-ID: <20221012141822.55E8E3858034@sourceware.org> (raw) 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");
reply other threads:[~2022-10-12 14:18 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20221012141822.55E8E3858034@sourceware.org \ --to=nsz@sourceware.org \ --cc=glibc-cvs@sourceware.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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).