diff options
author | Szabolcs Nagy <szabolcs.nagy@arm.com> | 2022-05-12 09:05:30 +0100 |
---|---|---|
committer | Szabolcs Nagy <szabolcs.nagy@arm.com> | 2022-10-27 14:46:54 +0100 |
commit | 010cf0128e02429c8686772f20cf80b2ca678939 (patch) | |
tree | 2d58d1b806920ecc8890699501aec84da4b5f8e2 | |
parent | 352adc1281d307089c30c2736b6ec501439478ca (diff) | |
download | glibc-010cf0128e02429c8686772f20cf80b2ca678939.zip glibc-010cf0128e02429c8686772f20cf80b2ca678939.tar.gz glibc-010cf0128e02429c8686772f20cf80b2ca678939.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
-rw-r--r-- | elf/dl-profile.c | 4 |
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 } |