1 //===- MCAsmInfoELF.cpp - ELF asm properties ------------------------------===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 // This file defines target asm properties related what form asm statements
11 // should take in general on ELF-based targets
13 //===----------------------------------------------------------------------===//
15 #include "llvm/MC/MCAsmInfoELF.h"
16 #include "llvm/MC/MCContext.h"
17 #include "llvm/MC/MCSectionELF.h"
18 #include "llvm/Support/ELF.h"
22 void MCAsmInfoELF::anchor() {}
24 MCSection *MCAsmInfoELF::getNonexecutableStackSection(MCContext &Ctx) const {
25 if (!UsesNonexecutableStackSection)
27 return Ctx.getELFSection(".note.GNU-stack", ELF::SHT_PROGBITS, 0);
30 MCAsmInfoELF::MCAsmInfoELF() {
31 HasIdentDirective = true;
32 WeakRefDirective = "\t.weak\t";
33 PrivateGlobalPrefix = ".L";
34 PrivateLabelPrefix = ".L";