diff options
author | Waldemar Brodkorb <wbx@openadk.org> | 2024-03-20 09:44:40 +0100 |
---|---|---|
committer | Waldemar Brodkorb <wbx@openadk.org> | 2024-03-20 11:07:24 +0100 |
commit | 6bb2d37af6772cada51b0871d3184f7783779364 (patch) | |
tree | bcfd87bbe6713bb77d7fb7784f293c9fac235c38 /ldso | |
parent | cd5b45d5f755b07d7205ed471ed55422e450ba75 (diff) |
riscv32: sync with riscv64
Diffstat (limited to 'ldso')
-rw-r--r-- | ldso/ldso/riscv32/elfinterp.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ldso/ldso/riscv32/elfinterp.c b/ldso/ldso/riscv32/elfinterp.c index dc1ac994d..1a0d5d445 100644 --- a/ldso/ldso/riscv32/elfinterp.c +++ b/ldso/ldso/riscv32/elfinterp.c @@ -214,11 +214,11 @@ _dl_do_reloc (struct elf_resolve *tpnt, struct r_scope_elem *scope, *reloc_addr = tls_tpnt->l_tls_modid; break; case R_RISCV_TLS_DTPREL32: - *reloc_addr = symbol_addr + rpnt->r_addend; + *reloc_addr = symbol_addr -TLS_DTV_OFFSET + rpnt->r_addend; break; case R_RISCV_TLS_TPREL32: CHECK_STATIC_TLS ((struct link_map *) tls_tpnt); - *reloc_addr = tls_tpnt->l_tls_offset + symbol_addr + rpnt->r_addend - TLS_TCB_SIZE; + *reloc_addr = tls_tpnt->l_tls_offset + symbol_addr + rpnt->r_addend; break; #endif default: |