From: Szabolcs Nagy Date: Thu, 20 Oct 2022 16:27:04 +0000 (+0100) Subject: cheri: elf: Use elfptr_t for function symbol fixup X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ddd4011014924bd46d9fce4cc5333bea9d792d41;p=thirdparty%2Fglibc.git cheri: elf: Use elfptr_t for function symbol fixup Propagate capabilities during lazy binding and IFUNC fixup in dlsym. --- diff --git a/elf/dl-sym-post.h b/elf/dl-sym-post.h index 28ca1cad7e1..7c8b9b6e77c 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 95bcfc1cc14..149945614b1 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)