Reformat of conditions for calculating r_offset in RelocationSection<ELFT>::writeTo(). NFC.

llvm-svn: 256563
This commit is contained in:
George Rimar 2015-12-29 16:17:32 +00:00
parent 254825a356
commit 4b5346fa49
1 changed files with 6 additions and 8 deletions

View File

@ -283,17 +283,15 @@ template <class ELFT> void RelocationSection<ELFT>::writeTo(uint8_t *Buf) {
Reloc = Target->getDynReloc(Type);
P->setSymbolAndType(Sym, Reloc, Config->Mips64EL);
if (NeedsGot) {
if (LazyReloc)
P->r_offset = Out<ELFT>::GotPlt->getEntryAddr(*Body);
else
P->r_offset = Out<ELFT>::Got->getEntryAddr(*Body);
} else if (NeedsCopy) {
if (LazyReloc)
P->r_offset = Out<ELFT>::GotPlt->getEntryAddr(*Body);
else if (NeedsGot)
P->r_offset = Out<ELFT>::Got->getEntryAddr(*Body);
else if (NeedsCopy)
P->r_offset = Out<ELFT>::Bss->getVA() +
dyn_cast<SharedSymbol<ELFT>>(Body)->OffsetInBSS;
} else {
else
P->r_offset = C.getOffset(RI.r_offset) + C.OutSec->getVA();
}
uintX_t OrigAddend = 0;
if (IsRela && !NeedsGot)