assert(!Obj.isRelocationScattered(RelInfo) &&
"Scattered relocations not supported on X86_64");
- RelocationEntry RE(getBasicRelocationEntry(SectionID, ObjImg, RelI));
+ RelocationEntry RE(getRelocationEntry(SectionID, ObjImg, RelI));
+ RE.Addend = memcpyAddend(RE);
RelocationValueRef Value(
getRelocationValueRef(ObjImg, RelI, RE, ObjSectionToID, Symbols));
bool IsExtern = Obj.getPlainRelocationExternal(RelInfo);
if (!IsExtern && RE.IsPCRel)
- makeValueAddendPCRel(Value, ObjImg, RelI);
+ makeValueAddendPCRel(Value, ObjImg, RelI, 1 << RE.Size);
if (RE.RelType == MachO::X86_64_RELOC_GOT ||
RE.RelType == MachO::X86_64_RELOC_GOT_LOAD)