diff options
author | Szabolcs Nagy <szabolcs.nagy@arm.com> | 2022-04-29 14:02:17 +0100 |
---|---|---|
committer | Szabolcs Nagy <szabolcs.nagy@arm.com> | 2022-10-27 14:46:53 +0100 |
commit | 73d195966deacbd30a7c62ad922b66dfba804ccc (patch) | |
tree | 78e4cf090e11d19d458d46f8960e977aa3dd0e4e /sysdeps | |
parent | eca0182a2b8f3603434f1385fadbb56cbfc90aab (diff) | |
download | glibc-73d195966deacbd30a7c62ad922b66dfba804ccc.zip glibc-73d195966deacbd30a7c62ad922b66dfba804ccc.tar.gz glibc-73d195966deacbd30a7c62ad922b66dfba804ccc.tar.bz2 |
aarch64: elf: avoid loading incompatible binaries
Prevent lp64 ld.so loading purecap binaries.
Diffstat (limited to 'sysdeps')
-rw-r--r-- | sysdeps/aarch64/dl-machine.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sysdeps/aarch64/dl-machine.h b/sysdeps/aarch64/dl-machine.h index ae8b144..f31695a 100644 --- a/sysdeps/aarch64/dl-machine.h +++ b/sysdeps/aarch64/dl-machine.h @@ -36,7 +36,8 @@ static inline int __attribute__ ((unused)) elf_machine_matches_host (const ElfW(Ehdr) *ehdr) { - return ehdr->e_machine == EM_AARCH64; + return ehdr->e_machine == EM_AARCH64 + && (ehdr->e_flags & EF_AARCH64_CHERI_PURECAP) == 0; } /* Return the run-time load address of the shared object. */ |