summaryrefslogtreecommitdiff
path: root/ldso
diff options
context:
space:
mode:
authorMax Filippov <jcmvbkbc@gmail.com>2018-01-17 05:52:54 -0800
committerWaldemar Brodkorb <wbx@uclibc-ng.org>2018-01-21 11:48:00 +0000
commita9a752b0cede664f641502c2ab87a6735fe8d889 (patch)
treed7f768bf1230a907d04c8ba5fa7a18612895e4de /ldso
parent4020e24ba18e66eb8a29a0cf81d599104dfd7aa2 (diff)
xtensa: fix R_XTENSA_TLSDESC_ARG handling in _dl_do_reloc
R_XTENSA_TLSDESC_ARG is a true RELA relocation, the addend is in the relocation record itself, not in place. Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
Diffstat (limited to 'ldso')
-rw-r--r--ldso/ldso/xtensa/elfinterp.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/ldso/ldso/xtensa/elfinterp.c b/ldso/ldso/xtensa/elfinterp.c
index 4c83ab65e..e38a02666 100644
--- a/ldso/ldso/xtensa/elfinterp.c
+++ b/ldso/ldso/xtensa/elfinterp.c
@@ -244,10 +244,11 @@ _dl_do_reloc (struct elf_resolve *tpnt, struct r_scope_elem *scope,
if (!TRY_STATIC_TLS ((struct link_map *) tls_tpnt))
*reloc_addr = (ElfW(Addr))
_dl_make_tlsdesc_dynamic((struct link_map *) tls_tpnt,
- symbol_addr + *reloc_addr);
+ symbol_addr + rpnt->r_addend);
else
#endif
- *reloc_addr += symbol_addr + tls_tpnt->l_tls_offset;
+ *reloc_addr = symbol_addr + rpnt->r_addend +
+ tls_tpnt->l_tls_offset;
break;
#endif