From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1944) id 76B5E38582A3; Fri, 5 Aug 2022 19:38:12 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 76B5E38582A3 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: a8989aef06cc29468d42f6efc21a06a46a32b249 X-Git-Newrev: 5ef98a99001f411448fef8cdf87a9f1d40b3db32 Message-Id: <20220805193812.76B5E38582A3@sourceware.org> Date: Fri, 5 Aug 2022 19:38:12 +0000 (GMT) X-BeenThere: glibc-cvs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Glibc-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Aug 2022 19:38:12 -0000 https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=5ef98a99001f411448fef8cdf87a9f1d40b3db32 commit 5ef98a99001f411448fef8cdf87a9f1d40b3db32 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 }