- Currently just has stub implementations for Mach-O, ELF, and COFF.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122037
91177308-0d34-0410-b5e6-
96231b3b80d8
class MCAssembler;
class MCFixup;
class MCFragment;
+class MCSymbolRefExpr;
class MCValue;
class raw_ostream;
const MCFixup &Fixup, MCValue Target,
uint64_t &FixedValue) = 0;
+ /// \brief Check whether the difference (A - B) between two symbol
+ /// references is fully resolved.
+ ///
+ /// Clients are not required to answer precisely and may conservatively return
+ /// false, even when a difference is fully resolved.
+ virtual bool
+ IsSymbolRefDifferenceFullyResolved(const MCAssembler &Asm,
+ const MCSymbolRefExpr *A,
+ const MCSymbolRefExpr *B) const = 0;
+
/// Check if a fixup is fully resolved.
///
/// This routine is used by the assembler to let the file format decide
uint64_t Size, uint32_t Link, uint32_t Info,
uint64_t Alignment, uint64_t EntrySize);
- virtual void WriteRelocationsFragment(const MCAssembler &Asm, MCDataFragment *F,
- const MCSectionData *SD);
+ virtual void WriteRelocationsFragment(const MCAssembler &Asm,
+ 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 IsFixupFullyResolved(const MCAssembler &Asm,
const MCValue Target,
UndefinedSymbolData);
}
+ bool IsSymbolRefDifferenceFullyResolved(const MCAssembler &Asm,
+ const MCSymbolRefExpr *A,
+ const MCSymbolRefExpr *B) const {
+ return false;
+ }
+
bool IsFixupFullyResolved(const MCAssembler &Asm,
const MCValue Target,
bool IsPCRel,
MCValue Target,
uint64_t &FixedValue);
+ virtual bool
+ IsSymbolRefDifferenceFullyResolved(const MCAssembler &Asm,
+ const MCSymbolRefExpr *A,
+ const MCSymbolRefExpr *B) const {
+ // FIXME: Implement this!
+ return false;
+ }
+
virtual bool IsFixupFullyResolved(const MCAssembler &Asm,
const MCValue Target,
bool IsPCRel,