LLVM
8.0.1
lib
MC
MCAsmInfoELF.cpp
Go to the documentation of this file.
1
//===- MCAsmInfoELF.cpp - ELF asm properties ------------------------------===//
2
//
3
// The LLVM Compiler Infrastructure
4
//
5
// This file is distributed under the University of Illinois Open Source
6
// License. See LICENSE.TXT for details.
7
//
8
//===----------------------------------------------------------------------===//
9
//
10
// This file defines target asm properties related what form asm statements
11
// should take in general on ELF-based targets
12
//
13
//===----------------------------------------------------------------------===//
14
15
#include "
llvm/MC/MCAsmInfoELF.h
"
16
#include "
llvm/BinaryFormat/ELF.h
"
17
#include "
llvm/MC/MCContext.h
"
18
#include "
llvm/MC/MCSectionELF.h
"
19
20
using namespace
llvm
;
21
22
void
MCAsmInfoELF::anchor() {}
23
24
MCSection
*MCAsmInfoELF::getNonexecutableStackSection(
MCContext
&Ctx)
const
{
25
if
(!
UsesNonexecutableStackSection
)
26
return
nullptr
;
27
return
Ctx.
getELFSection
(
".note.GNU-stack"
,
ELF::SHT_PROGBITS
, 0);
28
}
29
30
MCAsmInfoELF::MCAsmInfoELF
() {
31
HasIdentDirective
=
true
;
32
WeakRefDirective
=
"\t.weak\t"
;
33
PrivateGlobalPrefix
=
".L"
;
34
PrivateLabelPrefix
=
".L"
;
35
}
llvm::MCSection
Instances of this class represent a uniqued identifier for a section in the current translation unit...
Definition:
MCSection.h:39
MCContext.h
llvm::MCAsmInfo::PrivateLabelPrefix
StringRef PrivateLabelPrefix
This prefix is used for labels for basic blocks.
Definition:
MCAsmInfo.h:132
llvm
This class represents lattice values for constants.
Definition:
AllocatorList.h:24
ELF.h
llvm::MCAsmInfoELF::MCAsmInfoELF
MCAsmInfoELF()
Definition:
MCAsmInfoELF.cpp:30
MCAsmInfoELF.h
llvm::MCAsmInfoELF::UsesNonexecutableStackSection
bool UsesNonexecutableStackSection
Targets which have non-executable stacks by default can set this to false to disable the special sect...
Definition:
MCAsmInfoELF.h:24
llvm::ELF::SHT_PROGBITS
Definition:
ELF.h:813
MCSectionELF.h
llvm::MCContext
Context object for machine code objects.
Definition:
MCContext.h:63
llvm::MCAsmInfo::HasIdentDirective
bool HasIdentDirective
True if the target has a .ident directive, this is true for ELF targets.
Definition:
MCAsmInfo.h:287
llvm::MCAsmInfo::WeakRefDirective
const char * WeakRefDirective
This directive, if non-null, is used to declare a global as being a weak undefined symbol...
Definition:
MCAsmInfo.h:302
llvm::MCContext::getELFSection
MCSectionELF * getELFSection(const Twine &Section, unsigned Type, unsigned Flags)
Definition:
MCContext.h:389
llvm::MCAsmInfo::PrivateGlobalPrefix
StringRef PrivateGlobalPrefix
This prefix is used for globals like constant pool entries that are completely private to the ...
Definition:
MCAsmInfo.h:128
Generated on Sun Dec 20 2020 13:55:27 for LLVM by
1.8.13