Simplify. NFC.

llvm-svn: 258795
This commit is contained in:
Rui Ueyama 2016-01-26 07:17:27 +00:00
parent cf70cb9d00
commit 3ae28a4758
1 changed files with 5 additions and 5 deletions

View File

@ -348,14 +348,14 @@ template <class ELFT> void RelocationSection<ELFT>::writeTo(uint8_t *Buf) {
continue;
auto R = static_cast<const Elf_Rela &>(RI);
uintX_t Addend;
auto S = static_cast<Elf_Rela *>(P);
uintX_t A = NeedsGot ? 0 : R.r_addend;
if (CBP)
Addend = NeedsGot ? 0 : R.r_addend;
S->r_addend = A;
else if (Body)
Addend = getSymVA<ELFT>(*Body) + (NeedsGot ? 0 : R.r_addend);
S->r_addend = getSymVA<ELFT>(*Body) + A;
else
Addend = getLocalRelTarget(File, R, R.r_addend);
static_cast<Elf_Rela *>(P)->r_addend = Addend;
S->r_addend = getLocalRelTarget(File, R, A);
}
}