aboutsummaryrefslogtreecommitdiff
path: root/sysdeps
diff options
context:
space:
mode:
authorSzabolcs Nagy <szabolcs.nagy@arm.com>2022-04-20 09:54:31 +0100
committerSzabolcs Nagy <szabolcs.nagy@arm.com>2022-10-27 14:46:53 +0100
commit50bbdb94d32a75a577f393bf58cbc14f67d2fbea (patch)
treedf479e37f864b8c5cab69b43f83f20f37293fc6c /sysdeps
parent81d3513572a7f8ea91ee49e0c9ea4ba661567119 (diff)
downloadglibc-50bbdb94d32a75a577f393bf58cbc14f67d2fbea.zip
glibc-50bbdb94d32a75a577f393bf58cbc14f67d2fbea.tar.gz
glibc-50bbdb94d32a75a577f393bf58cbc14f67d2fbea.tar.bz2
cheri: elf: change l_entry to be elfptr_t
It is simpler and more consistent to make l_entry a capability throughout instead of leaving it as an address and converting before use: 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. Functions returning a pointer to the user entry are also changed to use elfptr_t.
Diffstat (limited to 'sysdeps')
-rw-r--r--sysdeps/generic/ldsodefs.h4
-rw-r--r--sysdeps/unix/sysv/linux/dl-sysdep.c6
2 files changed, 5 insertions, 5 deletions
diff --git a/sysdeps/generic/ldsodefs.h b/sysdeps/generic/ldsodefs.h
index f8cd388..4c407e4 100644
--- a/sysdeps/generic/ldsodefs.h
+++ b/sysdeps/generic/ldsodefs.h
@@ -1161,10 +1161,10 @@ extern void *_dl_sysdep_read_whole_file (const char *file, size_t *sizep,
After this, file access calls and getenv must work. This is responsible
for setting __libc_enable_secure if we need to be secure (e.g. setuid),
and for setting _dl_argc and _dl_argv, and then calling _dl_main. */
-extern ElfW(Addr) _dl_sysdep_start (void **start_argptr,
+extern elfptr_t _dl_sysdep_start (void **start_argptr,
void (*dl_main) (const ElfW(Phdr) *phdr,
ElfW(Word) phnum,
- ElfW(Addr) *user_entry,
+ elfptr_t *user_entry,
ElfW(auxv_t) *auxv))
attribute_hidden;
diff --git a/sysdeps/unix/sysv/linux/dl-sysdep.c b/sysdeps/unix/sysv/linux/dl-sysdep.c
index 9e15c5b..b77d7fb 100644
--- a/sysdeps/unix/sysv/linux/dl-sysdep.c
+++ b/sysdeps/unix/sysv/linux/dl-sysdep.c
@@ -67,7 +67,7 @@ struct dl_main_arguments
{
const ElfW(Phdr) *phdr;
ElfW(Word) phnum;
- ElfW(Addr) user_entry;
+ elfptr_t user_entry;
};
/* Separate function, so that dl_main can be called without the large
@@ -95,10 +95,10 @@ _dl_sysdep_parse_arguments (void **start_argptr,
args->user_entry = auxv_values[AT_ENTRY];
}
-ElfW(Addr)
+elfptr_t
_dl_sysdep_start (void **start_argptr,
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))
{
__libc_stack_end = DL_STACK_END (start_argptr);