MCDataFragment *F,
const MCSectionData *SD);
- virtual bool
- IsSymbolRefDifferenceFullyResolved(const MCAssembler &Asm,
- const MCSymbolRefExpr *A,
- const MCSymbolRefExpr *B) const {
- // FIXME: Implement this!
- return false;
- }
-
- virtual bool isAbsolute(bool IsSet, const MCSymbol &A,
- const MCSymbol &B) const {
- // On ELF A - B is absolute if A and B are in the same section.
- return &A.getSection() == &B.getSection();
- }
-
virtual bool IsFixupFullyResolved(const MCAssembler &Asm,
const MCValue Target,
bool IsPCRel,
return Data.getCommonAlignment();
const MCSymbol &Symbol = Data.getSymbol();
+
+ if (Symbol.isAbsolute() && Symbol.isVariable()) {
+ if (const MCExpr *Value = Symbol.getVariableValue()) {
+ int64_t IntValue;
+ if (Value->EvaluateAsAbsolute(IntValue, Layout))
+ return (uint64_t)IntValue;
+ }
+ }
+
if (!Symbol.isInSection())
return 0;