2017-04-16 16:01:22 +00:00
|
|
|
//===- MCAsmInfoELF.cpp - ELF asm properties ------------------------------===//
|
2013-12-22 00:04:03 +00:00
|
|
|
//
|
|
|
|
// The LLVM Compiler Infrastructure
|
|
|
|
//
|
|
|
|
// This file is distributed under the University of Illinois Open Source
|
|
|
|
// License. See LICENSE.TXT for details.
|
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
//
|
|
|
|
// This file defines target asm properties related what form asm statements
|
|
|
|
// should take in general on ELF-based targets
|
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
|
|
|
#include "llvm/MC/MCAsmInfoELF.h"
|
2015-01-18 16:17:27 +00:00
|
|
|
#include "llvm/MC/MCContext.h"
|
|
|
|
#include "llvm/MC/MCSectionELF.h"
|
|
|
|
#include "llvm/Support/ELF.h"
|
2017-04-16 16:01:22 +00:00
|
|
|
|
2013-12-22 00:04:03 +00:00
|
|
|
using namespace llvm;
|
|
|
|
|
2017-04-16 16:01:22 +00:00
|
|
|
void MCAsmInfoELF::anchor() {}
|
2013-12-22 00:04:03 +00:00
|
|
|
|
2015-05-27 18:44:32 +00:00
|
|
|
MCSection *MCAsmInfoELF::getNonexecutableStackSection(MCContext &Ctx) const {
|
2016-07-23 20:41:05 +00:00
|
|
|
if (!UsesNonexecutableStackSection)
|
|
|
|
return nullptr;
|
2015-05-27 18:44:32 +00:00
|
|
|
return Ctx.getELFSection(".note.GNU-stack", ELF::SHT_PROGBITS, 0);
|
2015-01-18 16:17:27 +00:00
|
|
|
}
|
|
|
|
|
2013-12-22 00:04:03 +00:00
|
|
|
MCAsmInfoELF::MCAsmInfoELF() {
|
|
|
|
HasIdentDirective = true;
|
|
|
|
WeakRefDirective = "\t.weak\t";
|
2014-11-24 09:08:18 +00:00
|
|
|
PrivateGlobalPrefix = ".L";
|
2015-01-18 16:17:27 +00:00
|
|
|
PrivateLabelPrefix = ".L";
|
2013-12-22 00:04:03 +00:00
|
|
|
}
|