This is an archive of the discontinued LLVM Phabricator instance.

[WebAssembly] Don't create a needless .note.GNU-stack section
ClosedPublic

Authored by sunfish on Jan 7 2016, 2:37 PM.

Details

Summary

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.

Diff Detail

Repository
rL LLVM

Event Timeline

sunfish updated this revision to Diff 44258.Jan 7 2016, 2:37 PM
sunfish retitled this revision from to [WebAssembly] Don't create a needless .note.GNU-stack section.
sunfish updated this object.
sunfish added a reviewer: rafael.
sunfish set the repository for this revision to rL LLVM.
sunfish added a subscriber: llvm-commits.
jfb accepted this revision.Jan 7 2016, 2:43 PM
jfb added a reviewer: jfb.

lgtm

I'm assuming other backends may be interested in using this too?

This revision is now accepted and ready to land.Jan 7 2016, 2:43 PM
sunfish updated this revision to Diff 44262.Jan 7 2016, 3:04 PM
sunfish edited edge metadata.

As requested here:

http://lists.llvm.org/pipermail/llvm-commits/Week-of-Mon-20160104/323230.html

changed to introduce and use a usesNonexecutableStackSection() hook instead.

rafael added inline comments.Jan 14 2016, 9:26 AM
include/llvm/MC/MCAsmInfoELF.h
25 ↗(On Diff #44262)

Can this be just a bool flag that is set by the constructor instead of a virtual function?

sunfish updated this revision to Diff 45027.Jan 15 2016, 1:37 PM

Use a bool flag that is set by the constructor instead of a virtual function, as requested by Rafael.

rafael accepted this revision.Jan 15 2016, 3:35 PM
rafael edited edge metadata.

LGTM

This revision was automatically updated to reflect the committed changes.