relocation_iterator
processRelocationRef(unsigned SectionID, relocation_iterator RelI,
- const ObjectFile &BaseObjT,
- ObjSectionToIDMap &ObjSectionToID,
+ ObjectImage &ObjImg, ObjSectionToIDMap &ObjSectionToID,
const SymbolTableMap &Symbols, StubMap &Stubs) override {
const MachOObjectFile &Obj =
- static_cast<const MachOObjectFile &>(BaseObjT);
+ static_cast<const MachOObjectFile &>(*ObjImg.getObjectFile());
MachO::any_relocation_info RelInfo =
Obj.getRelocation(RelI->getRawDataRefImpl());
assert(!Obj.isRelocationScattered(RelInfo) &&
"Scattered relocations not supported on X86_64");
- RelocationEntry RE(getRelocationEntry(SectionID, Obj, RelI));
+ RelocationEntry RE(getRelocationEntry(SectionID, ObjImg, RelI));
RE.Addend = memcpyAddend(RE);
RelocationValueRef Value(
- getRelocationValueRef(Obj, RelI, RE, ObjSectionToID, Symbols));
+ getRelocationValueRef(ObjImg, RelI, RE, ObjSectionToID, Symbols));
bool IsExtern = Obj.getPlainRelocationExternal(RelInfo);
if (!IsExtern && RE.IsPCRel)
- makeValueAddendPCRel(Value, Obj, RelI, 1 << RE.Size);
+ makeValueAddendPCRel(Value, ObjImg, RelI, 1 << RE.Size);
if (RE.RelType == MachO::X86_64_RELOC_GOT ||
RE.RelType == MachO::X86_64_RELOC_GOT_LOAD)
}
}
- void finalizeSection(const ObjectFile &Obj, unsigned SectionID,
+ void finalizeSection(ObjectImage &ObjImg, unsigned SectionID,
const SectionRef &Section) {}
private: