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