From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1944) id 4E6BC3852C53; Wed, 23 Nov 2022 14:45:02 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 4E6BC3852C53 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1669214702; bh=08knFNrkkDt2kNMWcLWRFrq7txWLWlk3s1H7WGdsDnQ=; h=From:To:Subject:Date:From; b=C9XXoRHp9pPyA2I2OQTrirT5fcnWDQpt0XhTDVAvaU1btH/rZ0ZIaFa5Id/UfEkXK AL4v2t7YXjMt4ghUD2tYZcvbTXULmE8Ai/r9nvlSHyDRWi1ilNarTBykp52apmY8QG eKILEnf2A2Znr+HF7DG7M8Pt5eq6kUBq1imZRWwA= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Szabolcs Nagy To: glibc-cvs@sourceware.org Subject: [glibc/arm/morello/main] cheri: Introduce elfptr_t int type that can hold pointers X-Act-Checkin: glibc X-Git-Author: Szabolcs Nagy X-Git-Refname: refs/heads/arm/morello/main X-Git-Oldrev: b4e28743ec4dbec80c2ebc1f596409ddca60322c X-Git-Newrev: 4960cacb7010ddebb808a420c2666da0b963cea7 Message-Id: <20221123144502.4E6BC3852C53@sourceware.org> Date: Wed, 23 Nov 2022 14:45:02 +0000 (GMT) List-Id: https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=4960cacb7010ddebb808a420c2666da0b963cea7 commit 4960cacb7010ddebb808a420c2666da0b963cea7 Author: Szabolcs Nagy Date: Thu Oct 20 12:33:20 2022 +0100 cheri: Introduce elfptr_t int type that can hold pointers Use elfptr_t when ElfW(Addr) represents a runtime pointer (may be dereferenced or pointers may be derived from it). Diff: --- elf/link.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/elf/link.h b/elf/link.h index 88b1ad7fd0..c0f255ae18 100644 --- a/elf/link.h +++ b/elf/link.h @@ -34,6 +34,12 @@ #include /* Defines __ELF_NATIVE_CLASS. */ #include +#ifdef __CHERI_PURE_CAPABILITY__ +typedef uintptr_t elfptr_t; +#else +typedef ElfW(Addr) elfptr_t; +#endif + /* The legacy rendezvous structure used by the run-time dynamic linker to communicate details of shared object loading to the debugger. */