summarylogtreecommitdiffstats
path: root/stack-noexec.patch
blob: d7ca8289b10809691266dc76d51012abffa95f7b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
diff -ur zdoom-2.6.1.orig/src/asm_ia32/a.asm zdoom-2.6.1/src/asm_ia32/a.asm
--- zdoom-2.6.1.orig/src/asm_ia32/a.asm	2012-07-02 00:49:34.000000000 +0200
+++ zdoom-2.6.1/src/asm_ia32/a.asm	2012-11-06 14:43:00.501239342 +0100
@@ -810,3 +810,13 @@
 GLOBAL _rtext_a_end
 _rtext_a_end:
 %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
diff -ur zdoom-2.6.1.orig/src/asm_ia32/misc.asm zdoom-2.6.1/src/asm_ia32/misc.asm
--- zdoom-2.6.1.orig/src/asm_ia32/misc.asm	2012-07-02 00:49:34.000000000 +0200
+++ zdoom-2.6.1/src/asm_ia32/misc.asm	2012-11-06 14:43:10.124572789 +0100
@@ -198,3 +198,13 @@
 		pop		ebx
 		emms
 		ret
+
+%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
diff -ur zdoom-2.6.1.orig/src/asm_ia32/tmap2.asm zdoom-2.6.1/src/asm_ia32/tmap2.asm
--- zdoom-2.6.1.orig/src/asm_ia32/tmap2.asm	2012-07-02 00:49:34.000000000 +0200
+++ zdoom-2.6.1/src/asm_ia32/tmap2.asm	2012-11-06 14:43:39.091239794 +0100
@@ -638,3 +638,13 @@
 GLOBAL _rtext_tmap2_end
 _rtext_tmap2_end:
 %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
diff -ur zdoom-2.6.1.orig/src/asm_ia32/tmap3.asm zdoom-2.6.1/src/asm_ia32/tmap3.asm
--- zdoom-2.6.1.orig/src/asm_ia32/tmap3.asm	2012-07-02 00:49:34.000000000 +0200
+++ zdoom-2.6.1/src/asm_ia32/tmap3.asm	2012-11-06 14:35:26.421234034 +0100
@@ -342,3 +342,13 @@
 GLOBAL _rtext_tmap3_end
 _rtext_tmap3_end:
 %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
diff -ur zdoom-2.6.1.orig/src/asm_ia32/tmap.asm zdoom-2.6.1/src/asm_ia32/tmap.asm
--- zdoom-2.6.1.orig/src/asm_ia32/tmap.asm	2012-07-02 00:49:34.000000000 +0200
+++ zdoom-2.6.1/src/asm_ia32/tmap.asm	2012-11-06 14:43:28.244573001 +0100
@@ -1891,3 +1891,13 @@
 		selfmod rtext_start, rtext_end
 		call	setpitch3
 		jmp		setvlinebpl_
+
+%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
diff -ur zdoom-2.6.1.orig/src/asm_x86_64/tmap3.s zdoom-2.6.1/src/asm_x86_64/tmap3.s
--- zdoom-2.6.1.orig/src/asm_x86_64/tmap3.s	2012-07-02 00:49:36.000000000 +0200
+++ zdoom-2.6.1/src/asm_x86_64/tmap3.s	2012-11-06 14:34:28.807900032 +0100
@@ -139,3 +139,4 @@
 		.align 16
 
 
+		.section	.note.GNU-stack,"",@progbits