diff options
author | Szabolcs Nagy <szabolcs.nagy@arm.com> | 2022-09-07 10:38:29 +0100 |
---|---|---|
committer | Szabolcs Nagy <szabolcs.nagy@arm.com> | 2022-10-12 14:22:03 +0100 |
commit | 87dffcda136a7d1b0c0f81ccf9ac084178181321 (patch) | |
tree | 19426654b012842896288e05aed74b5bb86d0294 /elf | |
parent | a66d563c9e33cffbf646e1327bdd73423a10ef76 (diff) | |
download | glibc-87dffcda136a7d1b0c0f81ccf9ac084178181321.zip glibc-87dffcda136a7d1b0c0f81ccf9ac084178181321.tar.gz glibc-87dffcda136a7d1b0c0f81ccf9ac084178181321.tar.bz2 |
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 599efb1..8551e18 100644 --- a/elf/dl-support.c +++ b/elf/dl-support.c @@ -263,6 +263,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 |