aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/unix/sysv/linux/arm/readelflib.c
diff options
context:
space:
mode:
authorSzabolcs Nagy <szabolcs.nagy@arm.com>2022-07-15 08:15:02 +0100
committerSzabolcs Nagy <szabolcs.nagy@arm.com>2022-10-27 14:46:53 +0100
commit7beb22bd94af7e1c7faae3a6c13a2db85af0e216 (patch)
tree4b7d9195edeba50b935e85e170ff6701a8c023fd /sysdeps/unix/sysv/linux/arm/readelflib.c
parent4e3c34542ba58f53b7a828c266f8d7c931237809 (diff)
downloadglibc-7beb22bd94af7e1c7faae3a6c13a2db85af0e216.tar
glibc-7beb22bd94af7e1c7faae3a6c13a2db85af0e216.tar.gz
glibc-7beb22bd94af7e1c7faae3a6c13a2db85af0e216.tar.bz2
glibc-7beb22bd94af7e1c7faae3a6c13a2db85af0e216.zip
aarch64: morello: fix ldconfig for purecap abi
Add purecap ld cache flag. Add the purecap ld.so name to known names. Handle lib64c system library paths. And set the purecap abi flag on cache entries.
Diffstat (limited to 'sysdeps/unix/sysv/linux/arm/readelflib.c')
-rw-r--r--sysdeps/unix/sysv/linux/arm/readelflib.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/sysdeps/unix/sysv/linux/arm/readelflib.c b/sysdeps/unix/sysv/linux/arm/readelflib.c
index d4956e2d25..62d4e137c6 100644
--- a/sysdeps/unix/sysv/linux/arm/readelflib.c
+++ b/sysdeps/unix/sysv/linux/arm/readelflib.c
@@ -55,11 +55,18 @@ process_elf_file (const char *file_name, const char *lib, int *flag,
}
else
{
+ Elf64_Ehdr *elf64_header = (Elf64_Ehdr *) elf_header;
+
ret = process_elf64_file (file_name, lib, flag, isa_level, soname,
file_contents, file_length);
/* AArch64 libraries are always libc.so.6+. */
if (!ret)
- *flag = FLAG_AARCH64_LIB64|FLAG_ELF_LIBC6;
+ {
+ if (elf64_header->e_flags & EF_AARCH64_CHERI_PURECAP)
+ *flag = FLAG_AARCH64_PURECAP|FLAG_ELF_LIBC6;
+ else
+ *flag = FLAG_AARCH64_LIB64|FLAG_ELF_LIBC6;
+ }
}
return ret;
}