mirror of
https://git.FreeBSD.org/src.git
synced 2024-10-19 02:29:40 +00:00
Handle the R_386_TLS_TPOFF32 relocation, which is similar to R_386_TLS_TPOFF,
but with negative relocation value. Found by: mpfr test suite, pointed to by ale Reviewed by: kan MFC after: 1 week
This commit is contained in:
parent
4e63ea7386
commit
ef9cbd91d0
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=226156
@ -213,9 +213,11 @@ reloc_non_plt(Obj_Entry *obj, Obj_Entry *obj_rtld, RtldLockState *lockstate)
|
||||
break;
|
||||
|
||||
case R_386_TLS_TPOFF:
|
||||
case R_386_TLS_TPOFF32:
|
||||
{
|
||||
const Elf_Sym *def;
|
||||
const Obj_Entry *defobj;
|
||||
Elf_Addr add;
|
||||
|
||||
def = find_symdef(ELF_R_SYM(rel->r_info), obj, &defobj,
|
||||
false, cache, lockstate);
|
||||
@ -237,8 +239,11 @@ reloc_non_plt(Obj_Entry *obj, Obj_Entry *obj_rtld, RtldLockState *lockstate)
|
||||
goto done;
|
||||
}
|
||||
}
|
||||
|
||||
*where += (Elf_Addr) (def->st_value - defobj->tlsoffset);
|
||||
add = (Elf_Addr) (def->st_value - defobj->tlsoffset);
|
||||
if (ELF_R_TYPE(rel->r_info) == R_386_TLS_TPOFF)
|
||||
*where += add;
|
||||
else
|
||||
*where -= add;
|
||||
}
|
||||
break;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user