FixedValue = Value;
unsigned Type = GetRelocType(Target, Fixup, IsPCRel,
(RelocSymbol != 0), Addend);
+ MCSymbolRefExpr::VariantKind Modifier = Target.isAbsolute() ?
+ MCSymbolRefExpr::VK_None : Target.getSymA()->getKind();
+ if (RelocNeedsGOT(Modifier))
+ NeedsGOT = true;
uint64_t RelocOffset = Layout.getFragmentOffset(Fragment) +
Fixup.getOffset();
const MCFixup &Fixup,
bool IsPCRel,
bool IsRelocWithSymbol,
- int64_t Addend) {
- MCSymbolRefExpr::VariantKind Modifier = Target.isAbsolute() ?
- MCSymbolRefExpr::VK_None : Target.getSymA()->getKind();
-
- unsigned Type = GetRelocTypeInner(Target, Fixup, IsPCRel);
-
- if (RelocNeedsGOT(Modifier))
- NeedsGOT = true;
-
- return Type;
+ int64_t Addend) const {
+ return GetRelocTypeInner(Target, Fixup, IsPCRel);
}
unsigned ARMELFObjectWriter::GetRelocTypeInner(const MCValue &Target,
const MCFixup &Fixup,
bool IsPCRel,
bool IsRelocWithSymbol,
- int64_t Addend) {
+ int64_t Addend) const {
// determine the type of the relocation
unsigned Type;
if (IsPCRel) {
const MCFixup &Fixup,
bool IsPCRel,
bool IsRelocWithSymbol,
- int64_t Addend) {
+ int64_t Addend) const {
// determine the type of the relocation
unsigned Type;
if (IsPCRel) {
const MCFixup &Fixup,
bool IsPCRel,
bool IsRelocWithSymbol,
- int64_t Addend) {
+ int64_t Addend) const {
// determine the type of the relocation
MCSymbolRefExpr::VariantKind Modifier = Target.isAbsolute() ?
}
}
- if (RelocNeedsGOT(Modifier))
- NeedsGOT = true;
-
return Type;
}
const MCFixup &Fixup,
bool IsPCRel,
bool IsRelocWithSymbol,
- int64_t Addend) {
+ int64_t Addend) const {
// determine the type of the relocation
unsigned Type = (unsigned)ELF::R_MIPS_NONE;
unsigned Kind = (unsigned)Fixup.getKind();
protected:
virtual unsigned GetRelocType(const MCValue &Target, const MCFixup &Fixup,
bool IsPCRel, bool IsRelocWithSymbol,
- int64_t Addend) = 0;
+ int64_t Addend) const = 0;
virtual void adjustFixupOffset(const MCFixup &Fixup,
uint64_t &RelocOffset) {}
};
protected:
virtual unsigned GetRelocType(const MCValue &Target, const MCFixup &Fixup,
bool IsPCRel, bool IsRelocWithSymbol,
- int64_t Addend);
+ int64_t Addend) const;
};
virtual unsigned GetRelocType(const MCValue &Target, const MCFixup &Fixup,
bool IsPCRel, bool IsRelocWithSymbol,
- int64_t Addend);
+ int64_t Addend) const;
private:
unsigned GetRelocTypeInner(const MCValue &Target,
const MCFixup &Fixup, bool IsPCRel) const;
-
};
//===- PPCELFObjectWriter -------------------------------------------===//
protected:
virtual unsigned GetRelocType(const MCValue &Target, const MCFixup &Fixup,
bool IsPCRel, bool IsRelocWithSymbol,
- int64_t Addend);
+ int64_t Addend) const;
virtual void adjustFixupOffset(const MCFixup &Fixup, uint64_t &RelocOffset);
};
protected:
virtual unsigned GetRelocType(const MCValue &Target, const MCFixup &Fixup,
bool IsPCRel, bool IsRelocWithSymbol,
- int64_t Addend);
+ int64_t Addend) const;
};
//===- MipsELFObjectWriter -------------------------------------------===//
virtual unsigned GetRelocType(const MCValue &Target, const MCFixup &Fixup,
bool IsPCRel, bool IsRelocWithSymbol,
- int64_t Addend);
+ int64_t Addend) const;
};
}