From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1944) id 051273851508; Thu, 27 Oct 2022 13:55:04 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 051273851508 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1666878907; bh=2VP8xQsHcNCwuyRrCe0pFkPwTjqYo328G8gC739kCxs=; h=From:To:Subject:Date:From; b=IE9t34ZxtGbCq0by8+7Oz+Bn/W6PAGQKgjwVW0mXQuehRT5JjWF1KZJyIZAvAnDke w8+g/RMnybn/mmIlyGAxzMv/LNMuKYh1WK+K7OyTFOsjK7lnJNUn9Qsz0vAcNrBZoy j6c7OnFPrrpGwWox2v7IoXwsNf1dobpOH0d9u9bo= 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: db0005c7d3ad9f27e1acc0610b58dddde095be00 X-Git-Newrev: d9c082706ea28d45f94f8c7ec46e15ec615a2e66 Message-Id: <20221027135507.051273851508@sourceware.org> Date: Thu, 27 Oct 2022 13:55:04 +0000 (GMT) List-Id: https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=d9c082706ea28d45f94f8c7ec46e15ec615a2e66 commit d9c082706ea28d45f94f8c7ec46e15ec615a2e66 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. */