From a3085f72f8b450631ca0d9f8fe80482f079295ef Mon Sep 17 00:00:00 2001 From: Szabolcs Nagy Date: Tue, 6 Sep 2022 08:40:52 +0100 Subject: cheri: elf: make l_entry a capability Previously the entry address was fixed up to be a capability before using it so l_entry could be ElfW(Addr), but the code is simpler and more consistent if l_entry is a capability throughout: The AT_ENTRY auxv entry is specified to be a capability and a number if internal l_entry usage is simpler if it is elfptr_t. --- elf/rtld.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'elf') diff --git a/elf/rtld.c b/elf/rtld.c index f419dcc..3a1f32e 100644 --- a/elf/rtld.c +++ b/elf/rtld.c @@ -384,7 +384,7 @@ extern struct rtld_global_ro _rtld_local_ro static void dl_main (const ElfW(Phdr) *phdr, ElfW(Word) phnum, - ElfW(Addr) *user_entry, ElfW(auxv_t) *auxv); + elfptr_t *user_entry, ElfW(auxv_t) *auxv); /* These two variables cannot be moved into .data.rel.ro. */ static struct libname_list _dl_rtld_libname; @@ -453,7 +453,7 @@ static elfptr_t __attribute__ ((noinline)) _dl_start_final (void *arg, struct dl_start_final_info *info) #endif { - ElfW(Addr) start_addr; + elfptr_t start_addr; /* Do not use an initializer for these members because it would intefere with __rtld_static_init. */ @@ -1357,7 +1357,7 @@ _dl_start_args_adjust (int skip_args) static void dl_main (const ElfW(Phdr) *phdr, ElfW(Word) phnum, - ElfW(Addr) *user_entry, + elfptr_t *user_entry, ElfW(auxv_t) *auxv) { struct link_map *main_map; -- cgit v1.1