Please use GitHub pull requests for new patches. Phabricator shutdown timeline
Changeset View
Changeset View
Standalone View
Standalone View
lld/ELF/Arch/X86.cpp
Show First 20 Lines • Show All 161 Lines • ▼ Show 20 Lines | RelExpr X86::adjustRelaxExpr(RelType Type, const uint8_t *Data, | ||||
case R_RELAX_TLS_GD_TO_IE: | case R_RELAX_TLS_GD_TO_IE: | ||||
return R_RELAX_TLS_GD_TO_IE_GOTPLT; | return R_RELAX_TLS_GD_TO_IE_GOTPLT; | ||||
case R_RELAX_TLS_GD_TO_LE: | case R_RELAX_TLS_GD_TO_LE: | ||||
return R_RELAX_TLS_GD_TO_LE_NEG; | return R_RELAX_TLS_GD_TO_LE_NEG; | ||||
} | } | ||||
} | } | ||||
void X86::writeGotPltHeader(uint8_t *Buf) const { | void X86::writeGotPltHeader(uint8_t *Buf) const { | ||||
write32le(Buf, In.Dynamic->getVA()); | write32le(Buf, Main->Dynamic->getVA()); | ||||
} | } | ||||
void X86::writeGotPlt(uint8_t *Buf, const Symbol &S) const { | void X86::writeGotPlt(uint8_t *Buf, const Symbol &S) const { | ||||
// Entries in .got.plt initially points back to the corresponding | // Entries in .got.plt initially points back to the corresponding | ||||
// PLT entries with a fixed offset to skip the first instruction. | // PLT entries with a fixed offset to skip the first instruction. | ||||
write32le(Buf, S.getPltVA() + 6); | write32le(Buf, S.getPltVA() + 6); | ||||
} | } | ||||
▲ Show 20 Lines • Show All 376 Lines • Show Last 20 Lines |