27 cl::desc(
"Add .note.gnu.property with BTI to assembly files"),
43 return ConstantPools->addEntry(
Streamer, Expr,
Size, Loc);
47 ConstantPools->emitForCurrentSection(
Streamer);
74 "The .note.gnu.property is not emitted because it is already present.");
103 for (
char &
C : Buffer) {
115 if (TT.isOSBinFormatELF())
117 if (TT.isOSBinFormatCOFF())
static cl::opt< bool > MarkBTIProperty("aarch64-mark-bti-property", cl::Hidden, cl::desc("Add .note.gnu.property with BTI to assembly files"), cl::init(false))
AArch64TargetStreamer(MCStreamer &S)
void emitNoteSection(unsigned Flags)
Callback used to implement the .note.gnu.property section.
void emitConstantPools() override
const MCExpr * addConstantPoolEntry(const MCExpr *, unsigned Size, SMLoc Loc)
Callback used to implement the ldr= pseudo.
~AArch64TargetStreamer() override
void emitCurrentConstantPool()
Callback used to implement the .ltorg directive.
virtual void emitInst(uint32_t Inst)
Callback used to implement the .inst directive.
Context object for machine code objects.
Base class for the full range of assembler expressions which are needed for parsing.
This represents a section on linux, lots of unix variants and some bare metal systems.
Instances of this class represent a uniqued identifier for a section in the current translation unit.
bool isRegistered() const
Streaming machine code generation interface.
MCContext & getContext() const
virtual void emitValueToAlignment(Align Alignment, int64_t Value=0, unsigned ValueSize=1, unsigned MaxBytesToEmit=0)
Emit some number of copies of Value until the byte alignment ByteAlignment is reached.
virtual void emitIntValue(uint64_t Value, unsigned Size)
Special case of EmitValue that avoids the client having to pass in a MCExpr for constant integers.
MCSymbol * endSection(MCSection *Section)
virtual void switchSection(MCSection *Section, const MCExpr *Subsection=nullptr)
Set the current section where code is being emitted to Section.
MCSection * getCurrentSectionOnly() const
virtual void emitBytes(StringRef Data)
Emit the bytes in Data into the output.
Generic base class for all target subtargets.
const Triple & getTargetTriple() const
Target specific streamer interface.
MCStreamer & getStreamer()
Represents a location in source code.
StringRef - Represent a constant reference to a string, i.e.
Triple - Helper class for working with autoconf configuration names.
@ C
The default llvm calling convention, compatible with C.
@ GNU_PROPERTY_AARCH64_FEATURE_1_AND
@ GNU_PROPERTY_AARCH64_FEATURE_1_BTI
initializer< Ty > init(const Ty &Val)
This is an optimization pass for GlobalISel generic memory operations.
MCTargetStreamer * createAArch64NullTargetStreamer(MCStreamer &S)
MCTargetStreamer * createAArch64ObjectTargetStreamer(MCStreamer &S, const MCSubtargetInfo &STI)
This struct is a compact representation of a valid (non-zero power of two) alignment.