2017-02-11 08:27:28 +08:00
|
|
|
//===- MCAsmInfoELF.cpp - ELF asm properties ------------------------------===//
|
2013-10-16 09:34:32 +08: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"
|
2017-06-07 11:48:56 +08:00
|
|
|
#include "llvm/BinaryFormat/ELF.h"
|
2014-10-15 23:44:16 +08:00
|
|
|
#include "llvm/MC/MCContext.h"
|
|
|
|
#include "llvm/MC/MCSectionELF.h"
|
2017-02-11 08:27:28 +08:00
|
|
|
|
2013-10-16 09:34:32 +08:00
|
|
|
using namespace llvm;
|
|
|
|
|
2017-02-11 08:27:28 +08:00
|
|
|
void MCAsmInfoELF::anchor() {}
|
2013-10-16 09:34:32 +08:00
|
|
|
|
2015-05-22 03:20:38 +08:00
|
|
|
MCSection *MCAsmInfoELF::getNonexecutableStackSection(MCContext &Ctx) const {
|
2016-01-16 07:59:13 +08:00
|
|
|
if (!UsesNonexecutableStackSection)
|
|
|
|
return nullptr;
|
2015-01-30 01:33:21 +08:00
|
|
|
return Ctx.getELFSection(".note.GNU-stack", ELF::SHT_PROGBITS, 0);
|
2014-10-15 23:44:16 +08:00
|
|
|
}
|
|
|
|
|
2013-10-16 09:34:32 +08:00
|
|
|
MCAsmInfoELF::MCAsmInfoELF() {
|
|
|
|
HasIdentDirective = true;
|
|
|
|
WeakRefDirective = "\t.weak\t";
|
2013-12-03 07:39:26 +08:00
|
|
|
PrivateGlobalPrefix = ".L";
|
2014-12-04 08:06:57 +08:00
|
|
|
PrivateLabelPrefix = ".L";
|
2013-10-16 09:34:32 +08:00
|
|
|
}
|