2017-02-11 01:27:28 +01:00
|
|
|
//===- MCAsmInfoELF.cpp - ELF asm properties ------------------------------===//
|
2013-10-16 03:34:32 +02:00
|
|
|
//
|
2019-01-19 09:50:56 +01:00
|
|
|
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
|
|
|
// See https://llvm.org/LICENSE.txt for license information.
|
|
|
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
2013-10-16 03:34:32 +02:00
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
//
|
|
|
|
// 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 05:48:56 +02:00
|
|
|
#include "llvm/BinaryFormat/ELF.h"
|
2014-10-15 17:44:16 +02:00
|
|
|
#include "llvm/MC/MCContext.h"
|
|
|
|
#include "llvm/MC/MCSectionELF.h"
|
2017-02-11 01:27:28 +01:00
|
|
|
|
2013-10-16 03:34:32 +02:00
|
|
|
using namespace llvm;
|
|
|
|
|
2017-02-11 01:27:28 +01:00
|
|
|
void MCAsmInfoELF::anchor() {}
|
2013-10-16 03:34:32 +02:00
|
|
|
|
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";
|
2013-10-16 03:34:32 +02:00
|
|
|
}
|