mirror of
https://github.com/intel/llvm.git
synced 2026-01-26 12:26:52 +08:00
Fix handling of addends on i386.
Because of merge sections it is not sufficient to just add them while applying a relocation. llvm-svn: 264863
This commit is contained in:
@@ -274,6 +274,8 @@ void InputSectionBase<ELFT>::relocate(uint8_t *Buf, uint8_t *BufEnd,
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!RelTy::IsRela)
|
||||
A += Target->getImplicitAddend(BufLoc, Type);
|
||||
uintX_t SymVA = Body.getVA<ELFT>(A);
|
||||
if (Config->EMachine == EM_MIPS)
|
||||
A += findMipsPairedAddend(Buf, BufLoc, Body, &RI, Rels.end());
|
||||
|
||||
Reference in New Issue
Block a user