1 From f8f3e54aa7bc15871ca4296cbc16ae065b07de4e Mon Sep 17 00:00:00 2001
2 From: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
3 Date: Wed, 2 Mar 2016 11:00:35 +0200
4 Subject: [PATCH] scanner: avoid executable stack
7 $ scanelf -lpqe ./wayland-scanner
8 RWX --- --- ./wayland-scanner
10 That indicates the stack is executable, which is a bad thing for
11 security. Wayland-scanner does not actually need an executable stack, it
12 is just an oversight from using an .S file in the sources.
14 Add a special incantation in dtddata.S to make it not cause the stack to
17 Reported-by: Mart Raudsepp <leio@gentoo.org>
18 Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
19 Tested-by: Mart Raudsepp <leio@gentoo.org>
21 src/dtddata.S | 8 ++++++++
22 1 file changed, 8 insertions(+)
24 diff --git a/src/dtddata.S b/src/dtddata.S
25 index 68e3435..ce51133 100644
29 * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
33 + * Avoid executable stack.
34 + * from: https://wiki.gentoo.org/wiki/Hardened/GNU_stack_quickstart
36 +#if defined(__linux__) && defined(__ELF__)
37 +.section .note.GNU-stack,"",%progbits
40 /* from: http://www.linuxjournal.com/content/embedding-file-executable-aka-hello-world-version-5967#comment-348129 */
42 .macro binfile name file