diff options
author | Szabolcs Nagy <szabolcs.nagy@arm.com> | 2022-09-01 16:43:19 +0100 |
---|---|---|
committer | Szabolcs Nagy <szabolcs.nagy@arm.com> | 2022-11-22 14:31:25 +0000 |
commit | 096943551e02aef644c7f180ee7a1f3474141e80 (patch) | |
tree | bcecc037fbe28be902bc511d55d8ee425e011a45 /sysdeps | |
parent | b9af312764f7a1f8d0c9c11118bbceae28c950f4 (diff) | |
download | glibc-096943551e02aef644c7f180ee7a1f3474141e80.tar.gz glibc-096943551e02aef644c7f180ee7a1f3474141e80.tar.xz glibc-096943551e02aef644c7f180ee7a1f3474141e80.zip |
aarch64: morello: add D_PTR_RW
Writable version of D_PTR, required for updating GOT[1] and GOT[2].
Diffstat (limited to 'sysdeps')
-rw-r--r-- | sysdeps/aarch64/ldsodefs.h | 4 | ||||
-rw-r--r-- | sysdeps/aarch64/morello/dl-machine.h | 2 |
2 files changed, 5 insertions, 1 deletions
diff --git a/sysdeps/aarch64/ldsodefs.h b/sysdeps/aarch64/ldsodefs.h index b0b23df93c..e86c7e1e0e 100644 --- a/sysdeps/aarch64/ldsodefs.h +++ b/sysdeps/aarch64/ldsodefs.h @@ -25,6 +25,10 @@ #ifdef __CHERI_PURE_CAPABILITY__ # define DO_ELF_MACHINE_REL_RELATIVE(map, l_addr, relative) \ elf_machine_rela_relative (map, relative) + +#define D_PTR_RW(map, i) \ + (dl_relocate_ld (map) ? (map)->i->d_un.d_ptr \ + : dl_rw_ptr ((map), (map)->i->d_un.d_ptr)) #endif struct La_aarch64_regs; diff --git a/sysdeps/aarch64/morello/dl-machine.h b/sysdeps/aarch64/morello/dl-machine.h index 11e026302c..0f681b1925 100644 --- a/sysdeps/aarch64/morello/dl-machine.h +++ b/sysdeps/aarch64/morello/dl-machine.h @@ -53,7 +53,7 @@ elf_machine_runtime_setup (struct link_map *l, struct r_scope_elem *scope[], extern void _dl_runtime_resolve (ElfW(Word)); extern void _dl_runtime_profile (ElfW(Word)); - got = (uintptr_t *) D_PTR (l, l_info[DT_PLTGOT]); + got = (uintptr_t *) D_PTR_RW (l, l_info[DT_PLTGOT]); if (got[1]) { l->l_mach.plt = dl_rx_ptr (l, got[1]); |