reloc.S: don't prevent !exec stack
authorH. Peter Anvin <hpa@zytor.com>
Thu, 14 Aug 2008 20:53:19 +0000 (13:53 -0700)
committerH. Peter Anvin <hpa@zytor.com>
Thu, 14 Aug 2008 20:53:19 +0000 (13:53 -0700)
Set the bit that allows the linker to generate the GNU_STACK
annotation, thus preventing the stack from execution.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
reloc.S

diff --git a/reloc.S b/reloc.S
index ddf20ab..09ea410 100644 (file)
--- a/reloc.S
+++ b/reloc.S
@@ -15,3 +15,9 @@ reloc:
                .incbin "reloc/reloc.bin"
                .size   reloc,.-reloc
 .L_reloc_end:
+
+/*
+ * This is necessary to keep the whole executable
+ * from needing a writable stack.
+ */
+               .section        .note.GNU-stack,"",@progbits