From 647e35b6ab9dc6a76c5bcb3aead5a4caaf1708cf Mon Sep 17 00:00:00 2001 From: Szabolcs Nagy Date: Thu, 20 Oct 2022 17:27:04 +0100 Subject: cheri: elf: Use elfptr_t for function symbol fixup Propagate capabilities during lazy binding and IFUNC fixup in dlsym. --- elf/dl-sym-post.h | 2 +- sysdeps/generic/dl-lookupcfg.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/elf/dl-sym-post.h b/elf/dl-sym-post.h index 28ca1cad7e..7c8b9b6e77 100644 --- a/elf/dl-sym-post.h +++ b/elf/dl-sym-post.h @@ -41,7 +41,7 @@ _dl_sym_post (lookup_t result, const ElfW(Sym) *ref, void *value, if (__glibc_unlikely (ELFW(ST_TYPE) (ref->st_info) == STT_GNU_IFUNC)) { DL_FIXUP_VALUE_TYPE fixup - = DL_FIXUP_MAKE_VALUE (result, (ElfW(Addr)) value); + = DL_FIXUP_MAKE_VALUE (result, (elfptr_t) value); fixup = elf_ifunc_invoke (DL_FIXUP_VALUE_ADDR (fixup)); value = (void *) DL_FIXUP_VALUE_CODE_ADDR (fixup); } diff --git a/sysdeps/generic/dl-lookupcfg.h b/sysdeps/generic/dl-lookupcfg.h index 95bcfc1cc1..149945614b 100644 --- a/sysdeps/generic/dl-lookupcfg.h +++ b/sysdeps/generic/dl-lookupcfg.h @@ -17,7 +17,7 @@ . */ /* The type of the return value of fixup/profile_fixup. */ -#define DL_FIXUP_VALUE_TYPE ElfW(Addr) +#define DL_FIXUP_VALUE_TYPE elfptr_t /* Construct a value of type DL_FIXUP_VALUE_TYPE from a code address and a link map. */ #define DL_FIXUP_MAKE_VALUE(map, addr) (addr) -- cgit 1.4.1