aboutsummaryrefslogtreecommitdiff
path: root/elf
diff options
context:
space:
mode:
authorSzabolcs Nagy <szabolcs.nagy@arm.com>2022-05-12 09:05:30 +0100
committerSzabolcs Nagy <szabolcs.nagy@arm.com>2022-08-05 19:45:19 +0100
commit5ef98a99001f411448fef8cdf87a9f1d40b3db32 (patch)
tree2c5b0805e7ea2ca6e336e185ac9824902bdac2cd /elf
parenta8989aef06cc29468d42f6efc21a06a46a32b249 (diff)
downloadglibc-5ef98a99001f411448fef8cdf87a9f1d40b3db32.zip
glibc-5ef98a99001f411448fef8cdf87a9f1d40b3db32.tar.gz
glibc-5ef98a99001f411448fef8cdf87a9f1d40b3db32.tar.bz2
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
Diffstat (limited to 'elf')
-rw-r--r--elf/dl-profile.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/elf/dl-profile.c b/elf/dl-profile.c
index ec57e3a..2cb66e8 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
}