+ Result.MayNeedFarStub = MayNeedFarStub;
+ Result.GOTRelative = GOTrelative;
+ Result.TargetResolve = false;
+ Result.Target.GV = GV;
+ return Result;
+ }
+
+ /// MachineRelocation::getIndirectSymbol - Return a relocation entry for an
+ /// indirect symbol.
+ static MachineRelocation getIndirectSymbol(uintptr_t offset,
+ unsigned RelocationType,
+ GlobalValue *GV, intptr_t cst = 0,
+ bool MayNeedFarStub = 0,
+ bool GOTrelative = 0) {
+ assert((RelocationType & ~63) == 0 && "Relocation type too large!");
+ MachineRelocation Result;
+ Result.Offset = offset;
+ Result.ConstantVal = cst;
+ Result.TargetReloType = RelocationType;
+ Result.AddrType = isIndirectSym;
+ Result.MayNeedFarStub = MayNeedFarStub;