diff options
author | Dmitry Chestnykh <dm.chestnykh@gmail.com> | 2024-04-17 14:20:40 +0300 |
---|---|---|
committer | Waldemar Brodkorb <wbx@openadk.org> | 2024-04-18 14:52:33 +0200 |
commit | 225478e84d4115205bfee73d1cf5688fdde499c8 (patch) | |
tree | 2f95aeee1667b1759177a237b72bb2a9c7c3aa0d /ldso | |
parent | 672afe85c21b8a18b7b7bfbe1dc4b75b2debda0b (diff) |
aarch64: Apply relocations to use TLS GD access model.
In aarch64 when the general dynamic access model is used for tls data
the linker emits two dynamic relocs (R_AARCH64_TLS_DTPMOD(64) and
R_AARCH64_TLS_DTPREL(64)) that must be applied by ld.so during object
loading.
Signed-off-by: Dmitry Chestnykh <dm.chestnykh@gmail.com>
Diffstat (limited to 'ldso')
-rw-r--r-- | ldso/ldso/aarch64/elfinterp.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/ldso/ldso/aarch64/elfinterp.c b/ldso/ldso/aarch64/elfinterp.c index 717a76980..9365569cc 100644 --- a/ldso/ldso/aarch64/elfinterp.c +++ b/ldso/ldso/aarch64/elfinterp.c @@ -238,6 +238,12 @@ _dl_do_reloc (struct elf_resolve *tpnt, struct r_scope_elem *scope, } } break; + case R_AARCH64_TLS_DTPMOD: + *reloc_addr = tls_tpnt->l_tls_modid; + break; + case R_AARCH64_TLS_DTPREL: + *reloc_addr = symbol_addr + rpnt->r_addend; + break; #endif default: return -1; /*call _dl_exit(1) */ |