From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1944) id 944E13852C53; Wed, 23 Nov 2022 14:48:10 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 944E13852C53 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1669214890; bh=Xsjd0c1Hvpgk4+tnBhxNUVxCnpBpuptp/5fD2qeH4LA=; h=From:To:Subject:Date:From; b=vLSplhNwvdSXE/8QceROdVP9HqVzkah5goaKXv5tsf1F+0poL80OoWLWabgPpjY4n eBGhPj1qPp7rzR9taQGOY2sa/s8+SQysUP9wFUO1gPnRfM3jEWCI1/zqrkWbSDjbrs JUvBX94v3Zbdn33Oak78j5LVUZBaeXKbeHFxoT8c= 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: 025e8cb8d9af704636b523b29bca4eb17aad50d0 X-Git-Newrev: 82f650eec80df339f1a8144039623a575f756161 Message-Id: <20221123144810.944E13852C53@sourceware.org> Date: Wed, 23 Nov 2022 14:48:10 +0000 (GMT) List-Id: https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=82f650eec80df339f1a8144039623a575f756161 commit 82f650eec80df339f1a8144039623a575f756161 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 }