diff options
author | Szabolcs Nagy <szabolcs.nagy@arm.com> | 2022-09-07 10:38:29 +0100 |
---|---|---|
committer | Szabolcs Nagy <szabolcs.nagy@arm.com> | 2022-11-22 14:31:25 +0000 |
commit | 90c5142f771b318dc905faf02162a01b8f546460 (patch) | |
tree | 485c3f79027b74dd7f9548abc446b8f8e77ec139 /elf | |
parent | 055042833f84bad40aacb4f952eae63351cf5fb3 (diff) | |
download | glibc-90c5142f771b318dc905faf02162a01b8f546460.tar.gz glibc-90c5142f771b318dc905faf02162a01b8f546460.tar.xz glibc-90c5142f771b318dc905faf02162a01b8f546460.zip |
cheri: Setup RX, RW capabilities for static linking
At least tls image access requires RX capability of the main link_map.
Diffstat (limited to 'elf')
-rw-r--r-- | elf/dl-support.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/elf/dl-support.c b/elf/dl-support.c index 4af0b5b2ce..ffc1d8d01b 100644 --- a/elf/dl-support.c +++ b/elf/dl-support.c @@ -255,6 +255,11 @@ _dl_aux_init (ElfW(auxv_t) *av) for (int i = 0; i < array_length (auxv_values); ++i) auxv_values[i] = 0; _dl_parse_auxv (av, auxv_values); + +# ifdef __CHERI_PURE_CAPABILITY__ + _dl_main_map.l_map_start = auxv_values[AT_CHERI_EXEC_RX_CAP]; + _dl_main_map.l_rw_start = auxv_values[AT_CHERI_EXEC_RW_CAP]; +# endif } #endif |