summaryrefslogtreecommitdiff
path: root/ldso
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@uclibc-ng.org>2017-04-16 17:45:46 +0200
committerWaldemar Brodkorb <wbx@uclibc-ng.org>2017-04-17 09:47:02 +0200
commit2f4000a2f56f9b80e431c3ad07b4c8e3711397fc (patch)
tree6671e4f83691c606540c76707074671c827e7e24 /ldso
parentec81b89935bc76c2b8829c19cbf0b954c5fad008 (diff)
aarch64: handle lazy relocation of TLSDESC
Binutils emits by default lazy relocations for TLSDESC and ld.so need to handle that. Fixes problems like: can't handle reloc type 0x407
Diffstat (limited to 'ldso')
-rw-r--r--ldso/ldso/aarch64/elfinterp.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/ldso/ldso/aarch64/elfinterp.c b/ldso/ldso/aarch64/elfinterp.c
index 879484e16..2b5e185d8 100644
--- a/ldso/ldso/aarch64/elfinterp.c
+++ b/ldso/ldso/aarch64/elfinterp.c
@@ -279,6 +279,17 @@ _dl_do_lazy_reloc (struct elf_resolve *tpnt, struct r_scope_elem *scope,
case R_AARCH64_JUMP_SLOT:
*reloc_addr += tpnt->loadaddr;
break;
+#if defined USE_TLS && USE_TLS
+ case R_AARCH64_TLSDESC:
+ {
+ struct tlsdesc volatile *td =
+ (struct tlsdesc volatile *)reloc_addr;
+
+ td->arg = (void*)rpnt;
+ td->entry = _dl_tlsdesc_return;
+ }
+ break;
+#endif
default:
return -1; /*call _dl_exit(1) */
}