fix powerpc dynamic linker thread-pointer-relative relocations
processing of R_PPC_TPREL32 was ignoring the addend provided by the RELA-style relocation and instead using the inline value as the addend. this presumably broke dynamic-linked access to initial TLS in cases where the addend was nonzero.
This commit is contained in:
parent
f4cc276018
commit
94cf991bf4
1 changed files with 3 additions and 3 deletions
|
|
@ -32,9 +32,9 @@ static inline int do_single_reloc(
|
||||||
*reloc_addr = def.sym->st_value + addend;
|
*reloc_addr = def.sym->st_value + addend;
|
||||||
break;
|
break;
|
||||||
case R_PPC_TPREL32:
|
case R_PPC_TPREL32:
|
||||||
*reloc_addr += def.sym
|
*reloc_addr = (def.sym
|
||||||
? def.sym->st_value + def.dso->tls_offset - 0x7000
|
? def.sym->st_value + def.dso->tls_offset
|
||||||
: self->tls_offset - 0x7000;
|
: self->tls_offset) - 0x7000 + addend;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue