From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1944) id 7D9A8384B0C6; Wed, 26 Oct 2022 15:16:28 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 7D9A8384B0C6 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1666797388; bh=zCYnHpiLGezZntxYD29sK6xRsR65cQp08RxBehuKmBM=; h=From:To:Subject:Date:From; b=E41CUEo2gPmcEOwfS8zVOgzUR11JsIsW9BMkkr9k6hrgOpt1CmUymPia59cnyzB38 lstbnUZJDlmhh3K2pFOuO/384poX6ZqiAgItbGRFqFz6EevNwvodFIaxL/erlnHvec h0Br63z8eSXBiNzPr1Q2D02AMLmTpMlrxefWQamg= 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: 0b476d1e176c6632807cfdb1be7fb0041cdbf82b X-Git-Newrev: 9d21cfb0aab80482e00b878a371b9e03eab5a74c Message-Id: <20221026151628.7D9A8384B0C6@sourceware.org> Date: Wed, 26 Oct 2022 15:16:28 +0000 (GMT) List-Id: https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=9d21cfb0aab80482e00b878a371b9e03eab5a74c commit 9d21cfb0aab80482e00b878a371b9e03eab5a74c 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. */