[PATCH] D15969: [WebAssembly] Don't create a needless .note.GNU-stack section
Dan Gohman via llvm-commits
llvm-commits at lists.llvm.org
Thu Jan 7 14:37:06 PST 2016
sunfish created this revision.
sunfish added a reviewer: rafael.
sunfish added a subscriber: llvm-commits.
sunfish set the repository for this revision to rL LLVM.
Herald added subscribers: dschuff, jfb.
WebAssembly's stack will never be executable by default, so it isn't necessary to declare .note.GNU-stack sections to request a non-executable stack.
Repository:
rL LLVM
http://reviews.llvm.org/D15969
Files:
include/llvm/MC/MCAsmInfoELF.h
lib/Target/WebAssembly/MCTargetDesc/WebAssemblyMCAsmInfo.cpp
lib/Target/WebAssembly/MCTargetDesc/WebAssemblyMCAsmInfo.h
Index: include/llvm/MC/MCAsmInfoELF.h
===================================================================
--- include/llvm/MC/MCAsmInfoELF.h
+++ include/llvm/MC/MCAsmInfoELF.h
@@ -15,7 +15,7 @@
namespace llvm {
class MCAsmInfoELF : public MCAsmInfo {
virtual void anchor();
- MCSection *getNonexecutableStackSection(MCContext &Ctx) const final;
+ MCSection *getNonexecutableStackSection(MCContext &Ctx) const;
protected:
MCAsmInfoELF();
Index: lib/Target/WebAssembly/MCTargetDesc/WebAssemblyMCAsmInfo.h
===================================================================
--- lib/Target/WebAssembly/MCTargetDesc/WebAssemblyMCAsmInfo.h
+++ lib/Target/WebAssembly/MCTargetDesc/WebAssemblyMCAsmInfo.h
@@ -25,6 +25,8 @@
public:
explicit WebAssemblyMCAsmInfo(const Triple &T);
~WebAssemblyMCAsmInfo() override;
+
+ MCSection *getNonexecutableStackSection(MCContext &Ctx) const override;
};
} // end namespace llvm
Index: lib/Target/WebAssembly/MCTargetDesc/WebAssemblyMCAsmInfo.cpp
===================================================================
--- lib/Target/WebAssembly/MCTargetDesc/WebAssemblyMCAsmInfo.cpp
+++ lib/Target/WebAssembly/MCTargetDesc/WebAssemblyMCAsmInfo.cpp
@@ -45,3 +45,10 @@
// TODO: UseIntegratedAssembler?
}
+
+MCSection *
+WebAssemblyMCAsmInfo::getNonexecutableStackSection(MCContext &Ctx) const {
+ // In WebAssembly the stack is never executable, so it isn't necessary to
+ // declare this in the object file.
+ return nullptr;
+}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D15969.44258.patch
Type: text/x-patch
Size: 1488 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160107/581ed1ad/attachment.bin>
More information about the llvm-commits
mailing list