summaryrefslogtreecommitdiffstats
path: root/contrib/llvm/lib/MC/MCAsmInfoELF.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/llvm/lib/MC/MCAsmInfoELF.cpp')
-rw-r--r--contrib/llvm/lib/MC/MCAsmInfoELF.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/contrib/llvm/lib/MC/MCAsmInfoELF.cpp b/contrib/llvm/lib/MC/MCAsmInfoELF.cpp
index 2bff6e0..26e5608 100644
--- a/contrib/llvm/lib/MC/MCAsmInfoELF.cpp
+++ b/contrib/llvm/lib/MC/MCAsmInfoELF.cpp
@@ -21,6 +21,8 @@ using namespace llvm;
void MCAsmInfoELF::anchor() { }
MCSection *MCAsmInfoELF::getNonexecutableStackSection(MCContext &Ctx) const {
+ if (!UsesNonexecutableStackSection)
+ return nullptr;
return Ctx.getELFSection(".note.GNU-stack", ELF::SHT_PROGBITS, 0);
}
@@ -29,4 +31,5 @@ MCAsmInfoELF::MCAsmInfoELF() {
WeakRefDirective = "\t.weak\t";
PrivateGlobalPrefix = ".L";
PrivateLabelPrefix = ".L";
+ UsesNonexecutableStackSection = true;
}
OpenPOWER on IntegriCloud