about summary refs log tree commit diff
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-11-22 14:31:25 +0000
commit82f650eec80df339f1a8144039623a575f756161 (patch)
tree23bae332a221c9884073afb0504c74043877284d /elf
parent025e8cb8d9af704636b523b29bca4eb17aad50d0 (diff)
downloadglibc-82f650eec80df339f1a8144039623a575f756161.tar.gz
glibc-82f650eec80df339f1a8144039623a575f756161.tar.xz
glibc-82f650eec80df339f1a8144039623a575f756161.zip
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 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
 }