From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1944) id 2D3133851530; Thu, 27 Oct 2022 13:58:23 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 2D3133851530 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1666879103; bh=qMWuEJ2M/ThNmLzwC7Onos4p1/Lx1pO9m/umxHeFCf0=; h=From:To:Subject:Date:From; b=e/PtQHokdlD1GROSWdo1zSFeKtd99NoIq8ClG4kPNRNeQuBQF7kai12+JekyTL7i5 29fTVDX73x8RwVFQpWUQgTr3j+oAnRY26vpYE/5Xe+ngvzr58spISRaNGySMM+vrF0 MAxXptjLvz0xig/84If5m8DLkb4abilM2YyTs9OE= 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] TODO(sprof): cheri: disable profiling shared libraries X-Act-Checkin: glibc X-Git-Author: Szabolcs Nagy X-Git-Refname: refs/heads/arm/morello/main X-Git-Oldrev: 352adc1281d307089c30c2736b6ec501439478ca X-Git-Newrev: 010cf0128e02429c8686772f20cf80b2ca678939 Message-Id: <20221027135823.2D3133851530@sourceware.org> Date: Thu, 27 Oct 2022 13:58:23 +0000 (GMT) List-Id: https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=010cf0128e02429c8686772f20cf80b2ca678939 commit 010cf0128e02429c8686772f20cf80b2ca678939 Author: Szabolcs Nagy Date: Thu May 12 09:05:30 2022 +0100 TODO(sprof): cheri: disable profiling shared libraries This is needed now to avoid referencing abort in ld.so. TODO: Fixing shared library profiling for capabilities requires type fixes so capabilities are not stored into shared memory (maybe purecap layout can match the lp64 one and then no file format and external tooling change is required.) TODO: Proper fix also depends on _dl_runtime_profile plt entry Diff: --- elf/dl-profile.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/elf/dl-profile.c b/elf/dl-profile.c index ec57e3a965..2cb66e83c6 100644 --- a/elf/dl-profile.c +++ b/elf/dl-profile.c @@ -182,6 +182,9 @@ static unsigned int log_hashfraction; void _dl_start_profile (void) { +#ifdef __CHERI_PURE_CAPABILITY__ + __libc_fatal ("Profiling is not supported on capability architectures."); +#else char *filename; int fd; struct __stat64_t64 st; @@ -482,6 +485,7 @@ _dl_start_profile (void) /* Turn on profiling. */ running = 1; +#endif }