Use the correct value to get the offset of the objects tls data.
Sponsored by: The FreeBSD Foundation
This commit is contained in:
parent
2db317ca85
commit
899b27a318
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=281556
@ -161,7 +161,7 @@ rtld_tlsdesc_handle_locked(struct tls_data *tlsdesc, int flags,
|
|||||||
if (def == NULL)
|
if (def == NULL)
|
||||||
rtld_die();
|
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);
|
return (tlsdesc->index);
|
||||||
}
|
}
|
||||||
@ -206,7 +206,7 @@ reloc_plt(Obj_Entry *obj)
|
|||||||
case R_AARCH64_TLSDESC:
|
case R_AARCH64_TLSDESC:
|
||||||
if (ELF_R_SYM(rela->r_info) == 0) {
|
if (ELF_R_SYM(rela->r_info) == 0) {
|
||||||
where[0] = (Elf_Addr)_rtld_tlsdesc;
|
where[0] = (Elf_Addr)_rtld_tlsdesc;
|
||||||
where[1] = obj->tlsindex + rela->r_addend;
|
where[1] = obj->tlsoffset + rela->r_addend;
|
||||||
} else {
|
} else {
|
||||||
where[0] = (Elf_Addr)_rtld_tlsdesc_dynamic;
|
where[0] = (Elf_Addr)_rtld_tlsdesc_dynamic;
|
||||||
where[1] = (Elf_Addr)reloc_tlsdesc_alloc(obj,
|
where[1] = (Elf_Addr)reloc_tlsdesc_alloc(obj,
|
||||||
|
Loading…
Reference in New Issue
Block a user