// The fixup was unresolved, we need a relocation. Inform the object
// writer of the relocation, and give it an opportunity to adjust the
// fixup value if need be.
- Writer->RecordRelocation(*this, *DF, Fixup, Target, FixedValue);
+ Writer->RecordRelocation(*this, DF, Fixup, Target, FixedValue);
}
getBackend().ApplyFixup(Fixup, *DF, FixedValue);
}
void RecordX86_64Relocation(const MCAssembler &Asm,
- const MCDataFragment &Fragment,
+ const MCFragment *Fragment,
const MCAsmFixup &Fixup, MCValue Target,
uint64_t &FixedValue) {
unsigned IsPCRel = isFixupKindPCRel(Fixup.Kind);
unsigned Log2Size = getFixupKindLog2Size(Fixup.Kind);
// See <reloc.h>.
- uint32_t Address = Fragment.getOffset() + Fixup.Offset;
+ uint32_t Address = Fragment->getOffset() + Fixup.Offset;
int64_t Value = 0;
unsigned Index = 0;
unsigned IsExtern = 0;
(Log2Size << 25) |
(IsExtern << 27) |
(Type << 28));
- Relocations[Fragment.getParent()].push_back(MRE);
+ Relocations[Fragment->getParent()].push_back(MRE);
Index = B_Base->getIndex();
IsExtern = 1;
(Log2Size << 25) |
(IsExtern << 27) |
(Type << 28));
- Relocations[Fragment.getParent()].push_back(MRE);
+ Relocations[Fragment->getParent()].push_back(MRE);
}
void RecordScatteredRelocation(const MCAssembler &Asm,
- const MCFragment &Fragment,
+ const MCFragment *Fragment,
const MCAsmFixup &Fixup, MCValue Target,
uint64_t &FixedValue) {
- uint32_t Address = Fragment.getOffset() + Fixup.Offset;
+ uint32_t Address = Fragment->getOffset() + Fixup.Offset;
unsigned IsPCRel = isFixupKindPCRel(Fixup.Kind);
unsigned Log2Size = getFixupKindLog2Size(Fixup.Kind);
unsigned Type = RIT_Vanilla;
(IsPCRel << 30) |
RF_Scattered);
MRE.Word1 = Value2;
- Relocations[Fragment.getParent()].push_back(MRE);
+ Relocations[Fragment->getParent()].push_back(MRE);
}
MachRelocationEntry MRE;
(IsPCRel << 30) |
RF_Scattered);
MRE.Word1 = Value;
- Relocations[Fragment.getParent()].push_back(MRE);
+ Relocations[Fragment->getParent()].push_back(MRE);
}
- void RecordRelocation(const MCAssembler &Asm, const MCDataFragment &Fragment,
+ void RecordRelocation(const MCAssembler &Asm, const MCFragment *Fragment,
const MCAsmFixup &Fixup, MCValue Target,
uint64_t &FixedValue) {
if (Is64Bit) {
}
// See <reloc.h>.
- uint32_t Address = Fragment.getOffset() + Fixup.Offset;
+ uint32_t Address = Fragment->getOffset() + Fixup.Offset;
uint32_t Value = 0;
unsigned Index = 0;
unsigned IsExtern = 0;
(Log2Size << 25) |
(IsExtern << 27) |
(Type << 28));
- Relocations[Fragment.getParent()].push_back(MRE);
+ Relocations[Fragment->getParent()].push_back(MRE);
}
void BindIndirectSymbols(MCAssembler &Asm) {
}
void MachObjectWriter::RecordRelocation(const MCAssembler &Asm,
- const MCDataFragment &Fragment,
+ const MCFragment *Fragment,
const MCAsmFixup &Fixup, MCValue Target,
uint64_t &FixedValue) {
((MachObjectWriterImpl*) Impl)->RecordRelocation(Asm, Fragment, Fixup,