You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

65 lines
2.2 KiB

# --- SDE-COPYRIGHT-NOTE-BEGIN ---
# This copyright note is auto-generated by ./scripts/Create-CopyPatch.
#
# Filename: package/.../e3/e3-gnu-stack.patch
# Copyright (C) 2013 The OpenSDE Project
#
# More information can be found in the files COPYING and README.
#
# This patch file is dual-licensed. It is available under the license the
# patched project is licensed under, as long as it is an OpenSource license
# as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
# of the GNU General Public License as published by the Free Software
# Foundation; either version 2 of the License, or (at your option) any later
# version.
# --- SDE-COPYRIGHT-NOTE-END ---
mark the stack as non-executable and disable tiny/crippled elf on 32
bit linux so that stack can be marked as non-executable on it too
http://www.gentoo.org/proj/en/hardened/gnu-stack.xml
this change will slightly increase the size of the e3 binary.
On 32bit x86 the size in bytes reported by stat(1) is:
- with tiny/crippled elf header: 13283
- without tiny/crippled elf header: 16880
patch origin: http://pkgs.fedoraproject.org/cgit/e3.git/plain/e3-gnu-stack.patch
diff -u e3-2.8.orig/e3.asm e3-2.8/e3.asm
--- e3-2.8.orig/e3.asm 2010-05-09 12:16:47.000000000 -0400
+++ e3-2.8/e3.asm 2013-02-22 14:24:46.884384131 -0500
@@ -6543,3 +6543,13 @@
%ifdef CRIPLED_ELF
bsssize equ $-bssstart
%endif
+
+%ifidn __OUTPUT_FORMAT__,elf
+section .note.GNU-stack noalloc noexec nowrite progbits
+%endif
+%ifidn __OUTPUT_FORMAT__,elf32
+section .note.GNU-stack noalloc noexec nowrite progbits
+%endif
+%ifidn __OUTPUT_FORMAT__,elf64
+section .note.GNU-stack noalloc noexec nowrite progbits
+%endif
Only in e3-2.8: e3.asm~
diff -u e3-2.8.orig/Makefile e3-2.8/Makefile
--- e3-2.8.orig/Makefile 2010-05-27 14:58:59.000000000 -0400
+++ e3-2.8/Makefile 2013-02-22 15:38:57.729605772 -0500
@@ -38,15 +38,10 @@
#---------------- 32 bit LINUX (and perhaps BSD) --
32: $(ASOURCES) Makefile
-ifeq ($(OS),LINUX)
- nasm -O2 -f bin -l e3.lst -o e3 e3.asm -DCRIPLED_ELF=1 -D$(OS) -D$(EXMODE)
- chmod +x e3
-else
echo $(ASVER)
nasm -O2 $(AFLAGS) -o e3.o e3.asm -l e3.lst -D$(OS) -D$(EXMODE)
ld -s -o e3 e3.o
strip --remove-section .comment e3
-endif
ln -sf e3 e3ws
ln -sf e3 e3em
ln -sf e3 e3pi