llvm::MCObjectStreamer::emitAbsoluteSymbolDiff

Emit the absolute difference between two symbols if possible.

Synopsis

Declared in <llvm/MC/MCObjectStreamer.h>

virtual
void
emitAbsoluteSymbolDiff(
    MCSymbol const* Hi,
    MCSymbol const* Lo,
    unsigned int Size) override;

Description

Emit the absolute difference between Hi and Lo, as long as we can compute it. Currently, that requires that both symbols are in the same data fragment and that the target has not specified that diff expressions require relocations to be emitted. Otherwise, do nothing and return false.

Parameters

NameDescription
Hi- Symbol with the greater offset.
Lo- Symbol with the lesser offset.
Size- Size of the difference (in bytes) to emit.

Preconditions

  • Offset of Hi is greater than the offset Lo.