LLVM 17.0.0git
MCAsmInfoELF.cpp
Go to the documentation of this file.
1//===- MCAsmInfoELF.cpp - ELF asm properties ------------------------------===//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8//
9// This file defines target asm properties related what form asm statements
10// should take in general on ELF-based targets
11//
12//===----------------------------------------------------------------------===//
13
16#include "llvm/MC/MCContext.h"
18
19using namespace llvm;
20
21void MCAsmInfoELF::anchor() {}
22
23MCSection *MCAsmInfoELF::getNonexecutableStackSection(MCContext &Ctx) const {
24 return Ctx.getELFSection(".note.GNU-stack", ELF::SHT_PROGBITS, 0);
25}
26
28 HasIdentDirective = true;
29 WeakRefDirective = "\t.weak\t";
31 PrivateLabelPrefix = ".L";
32}
StringRef PrivateGlobalPrefix
This prefix is used for globals like constant pool entries that are completely private to the ....
Definition: MCAsmInfo.h:168
const char * WeakRefDirective
This directive, if non-null, is used to declare a global as being a weak undefined symbol.
Definition: MCAsmInfo.h:414
StringRef PrivateLabelPrefix
This prefix is used for labels for basic blocks.
Definition: MCAsmInfo.h:172
bool HasIdentDirective
True if the target has a .ident directive, this is true for ELF targets.
Definition: MCAsmInfo.h:399
Context object for machine code objects.
Definition: MCContext.h:76
MCSectionELF * getELFSection(const Twine &Section, unsigned Type, unsigned Flags)
Definition: MCContext.h:563
Instances of this class represent a uniqued identifier for a section in the current translation unit.
Definition: MCSection.h:39
@ SHT_PROGBITS
Definition: ELF.h:995
This is an optimization pass for GlobalISel generic memory operations.
Definition: AddressRanges.h:18