svn commit: r281556 - head/libexec/rtld-elf/aarch64
Andrew Turner
andrew at FreeBSD.org
Wed Apr 15 14:20:13 UTC 2015
Author: andrew
Date: Wed Apr 15 14:20:12 2015
New Revision: 281556
URL: https://svnweb.freebsd.org/changeset/base/281556
Log:
Use the correct value to get the offset of the objects tls data.
Sponsored by: The FreeBSD Foundation
Modified:
head/libexec/rtld-elf/aarch64/reloc.c
Modified: head/libexec/rtld-elf/aarch64/reloc.c
==============================================================================
--- head/libexec/rtld-elf/aarch64/reloc.c Wed Apr 15 14:20:03 2015 (r281555)
+++ head/libexec/rtld-elf/aarch64/reloc.c Wed Apr 15 14:20:12 2015 (r281556)
@@ -161,7 +161,7 @@ rtld_tlsdesc_handle_locked(struct tls_da
if (def == NULL)
rtld_die();
- tlsdesc->index = defobj->tlsindex + def->st_value + rela->r_addend;
+ tlsdesc->index = defobj->tlsoffset + def->st_value + rela->r_addend;
return (tlsdesc->index);
}
@@ -206,7 +206,7 @@ reloc_plt(Obj_Entry *obj)
case R_AARCH64_TLSDESC:
if (ELF_R_SYM(rela->r_info) == 0) {
where[0] = (Elf_Addr)_rtld_tlsdesc;
- where[1] = obj->tlsindex + rela->r_addend;
+ where[1] = obj->tlsoffset + rela->r_addend;
} else {
where[0] = (Elf_Addr)_rtld_tlsdesc_dynamic;
where[1] = (Elf_Addr)reloc_tlsdesc_alloc(obj,
More information about the svn-src-head
mailing list