summaryrefslogtreecommitdiffstats
path: root/llvm/lib/MC
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2014-10-15 15:44:16 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2014-10-15 15:44:16 +0000
commitad33dd2914dd932bec561fbc219d0d06968cb99f (patch)
treec6f88061279a8f1a2e974bdbef673f85d66fb578 /llvm/lib/MC
parentfb237520eef7469310f6d2a13cdf279afe923913 (diff)
downloadbcm5719-llvm-ad33dd2914dd932bec561fbc219d0d06968cb99f.tar.gz
bcm5719-llvm-ad33dd2914dd932bec561fbc219d0d06968cb99f.zip
Move getNonexecutableStackSection up to the base ELF class.
The .note.GNU-stack section is not SystemZ/X86 specific. llvm-svn: 219796
Diffstat (limited to 'llvm/lib/MC')
-rw-r--r--llvm/lib/MC/MCAsmInfoELF.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/llvm/lib/MC/MCAsmInfoELF.cpp b/llvm/lib/MC/MCAsmInfoELF.cpp
index ccb3dc3c6ed..9f70d8da80a 100644
--- a/llvm/lib/MC/MCAsmInfoELF.cpp
+++ b/llvm/lib/MC/MCAsmInfoELF.cpp
@@ -13,10 +13,19 @@
//===----------------------------------------------------------------------===//
#include "llvm/MC/MCAsmInfoELF.h"
+#include "llvm/MC/MCContext.h"
+#include "llvm/MC/MCSectionELF.h"
+#include "llvm/Support/ELF.h"
using namespace llvm;
void MCAsmInfoELF::anchor() { }
+const MCSection *
+MCAsmInfoELF::getNonexecutableStackSection(MCContext &Ctx) const {
+ return Ctx.getELFSection(".note.GNU-stack", ELF::SHT_PROGBITS,
+ 0, SectionKind::getMetadata());
+}
+
MCAsmInfoELF::MCAsmInfoELF() {
HasIdentDirective = true;
WeakRefDirective = "\t.weak\t";
OpenPOWER on IntegriCloud