Don't apply a recolation that the dynamic linker will rewrite.

This matches the behavior of both bfd and gold. Looks like we just got
here for mips because of a bad ordering of an if else chain.

llvm-svn: 265147
This commit is contained in:
Rafael Espindola
2016-04-01 16:21:09 +00:00
parent fde7622ec0
commit 2ee0092053
2 changed files with 4 additions and 4 deletions

View File

@@ -316,11 +316,11 @@ void InputSectionBase<ELFT>::relocate(uint8_t *Buf, uint8_t *BufEnd,
} else if (Target->needsThunk(Type, *this->getFile(), Body)) {
// Get address of a thunk code related to the symbol.
SymVA = Body.getThunkVA<ELFT>();
} else if (Config->EMachine == EM_MIPS) {
SymVA = adjustMipsSymVA<ELFT>(Type, *File, Body, AddrLoc, SymVA);
} else if (!Target->needsCopyRel<ELFT>(Type, Body) &&
Body.isPreemptible()) {
continue;
} else if (Config->EMachine == EM_MIPS) {
SymVA = adjustMipsSymVA<ELFT>(Type, *File, Body, AddrLoc, SymVA);
}
if (Target->isSizeRel(Type))
SymVA = Body.getSize<ELFT>() + A;