comparison src/hermes/x86_main.asm @ 1199:2d6dc7de1145

From: Mike Frysinger <vapier@gentoo.org> To: sdl@libsdl.org Date: Sun, 11 Dec 2005 22:57:37 -0500 Subject: [SDL] exec stack in libsdl update i posted back in September a patch to remove executable stacks: http://www.devolution.com/pipermail/sdl/2005-September/070626.html later in November, a similar patch was merged it seems: http://www.libsdl.org/cgi/cvsweb.cgi/SDL12/src/hermes/mmx_main.asm however, this lacks the additional output format checks that i posted in my patch ... this isnt a problem if the hermes asm code is only ever used to produce ELF objects, but if this is not true, then the additional checks in my original patch will need to be merged -mike
author Ryan C. Gordon <icculus@icculus.org>
date Mon, 12 Dec 2005 09:13:12 +0000
parents da33b7e6d181
children 3202d727bb4b
comparison
equal deleted inserted replaced
1198:b616ac4f39d1 1199:2d6dc7de1145
14 GLOBAL _ConvertX86 14 GLOBAL _ConvertX86
15 GLOBAL _x86return 15 GLOBAL _x86return
16 16
17 GLOBAL _Hermes_X86_CPU 17 GLOBAL _Hermes_X86_CPU
18 18
19 SECTION .note.GNU-stack noalloc progbits noexec nowrite
20 SECTION .data 19 SECTION .data
21 20
22 cpu_flags dd 0 21 cpu_flags dd 0
23 22
24 23
121 120
122 mov eax,[cpu_flags] 121 mov eax,[cpu_flags]
123 122
124 .L1: 123 .L1:
125 ret 124 ret
125
126 %ifidn __OUTPUT_FORMAT__,elf
127 section .note.GNU-stack noalloc noexec nowrite progbits
128 %endif