Please use GitHub pull requests for new patches. Phabricator shutdown timeline
Changeset View
Changeset View
Standalone View
Standalone View
lld/ELF/Arch/X86_64.cpp
Show First 20 Lines • Show All 126 Lines • ▼ Show 20 Lines | RelExpr X86_64::getRelExpr(RelType Type, const Symbol &S, | ||||
} | } | ||||
} | } | ||||
void X86_64::writeGotPltHeader(uint8_t *Buf) const { | void X86_64::writeGotPltHeader(uint8_t *Buf) const { | ||||
// The first entry holds the value of _DYNAMIC. It is not clear why that is | // The first entry holds the value of _DYNAMIC. It is not clear why that is | ||||
// required, but it is documented in the psabi and the glibc dynamic linker | // required, but it is documented in the psabi and the glibc dynamic linker | ||||
// seems to use it (note that this is relevant for linking ld.so, not any | // seems to use it (note that this is relevant for linking ld.so, not any | ||||
// other program). | // other program). | ||||
write64le(Buf, In.Dynamic->getVA()); | write64le(Buf, Main->Dynamic->getVA()); | ||||
} | } | ||||
void X86_64::writeGotPlt(uint8_t *Buf, const Symbol &S) const { | void X86_64::writeGotPlt(uint8_t *Buf, const Symbol &S) const { | ||||
// See comments in X86::writeGotPlt. | // See comments in X86::writeGotPlt. | ||||
write64le(Buf, S.getPltVA() + 6); | write64le(Buf, S.getPltVA() + 6); | ||||
} | } | ||||
void X86_64::writePltHeader(uint8_t *Buf) const { | void X86_64::writePltHeader(uint8_t *Buf) const { | ||||
▲ Show 20 Lines • Show All 558 Lines • Show Last 20 Lines |