60 :
MCELFStreamer(Context, 0, TAB, OS, Emitter), MappingSymbolCounter(0),
63 ~AArch64ELFStreamer() {}
66 const MCExpr *Subsection) {
70 LastMappingSymbols[getPreviousSection().first] = LastEMS;
71 LastEMS = LastMappingSymbols.lookup(Section);
79 virtual void EmitInstruction(
const MCInst& Inst) {
80 EmitA64MappingSymbol();
88 EmitDataMappingSymbol();
95 virtual void EmitValueImpl(
const MCExpr *
Value,
unsigned Size) {
96 EmitDataMappingSymbol();
101 enum ElfMappingSymbol {
107 void EmitDataMappingSymbol() {
108 if (LastEMS == EMS_Data)
return;
109 EmitMappingSymbol(
"$d");
113 void EmitA64MappingSymbol() {
114 if (LastEMS == EMS_A64)
return;
115 EmitMappingSymbol(
"$x");
120 MCSymbol *Start = getContext().CreateTempSymbol();
124 getContext().GetOrCreateSymbol(Name +
"." +
125 Twine(MappingSymbolCounter++));
127 MCSymbolData &SD = getAssembler().getOrCreateSymbolData(*Symbol);
131 AssignSection(Symbol, getCurrentSection().first);
137 int64_t MappingSymbolCounter;
140 ElfMappingSymbol LastEMS;
150 AArch64ELFStreamer *S =
new AArch64ELFStreamer(Context, TAB, OS, Emitter);
152 S->getAssembler().setRelaxAll(
true);
154 S->getAssembler().setNoExecStack(
true);
void setExternal(bool Value)
static void SetType(MCSymbolData &SD, unsigned Type)
virtual void ChangeSection(const MCSection *Section, const MCExpr *Subsection)
virtual void EmitValueImpl(const MCExpr *Value, unsigned Size)
static const MCSymbolRefExpr * Create(const MCSymbol *Symbol, MCContext &Ctx)
static void SetBinding(MCSymbolData &SD, unsigned Binding)
MCCodeEmitter - Generic instruction encoding interface.
virtual void EmitInstruction(const MCInst &Inst)
virtual void EmitBytes(StringRef Data)
void setVariableValue(const MCExpr *Value)
MCELFStreamer * createAArch64ELFStreamer(MCContext &Context, MCAsmBackend &TAB, raw_ostream &OS, MCCodeEmitter *Emitter, bool RelaxAll, bool NoExecStack)
LLVM Value Representation.
MCAsmBackend - Generic interface to target specific assembler backends.
cl::opt< bool > RelaxAll("mc-relax-all", cl::desc("When used with filetype=obj, ""relax all fixups in the emitted object file"))