Skip to content

Commit

Permalink
From: Mike Frysinger <vapier@gentoo.org>
Browse files Browse the repository at this point in the history
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
  • Loading branch information
icculus committed Dec 12, 2005
1 parent 1c3f54b commit 1413c3c
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 13 deletions.
7 changes: 3 additions & 4 deletions src/hermes/mmx_main.asm
Expand Up @@ -12,8 +12,6 @@ BITS 32
GLOBAL _ConvertMMX
GLOBAL _mmxreturn


SECTION .note.GNU-stack noalloc progbits noexec nowrite
SECTION .text
;; _ConvertMMX:
Expand Down Expand Up @@ -71,5 +69,6 @@ endconvert:
ret



%ifidn __OUTPUT_FORMAT__,elf
section .note.GNU-stack noalloc noexec nowrite progbits
%endif
6 changes: 3 additions & 3 deletions src/hermes/mmxp2_32.asm
Expand Up @@ -29,7 +29,6 @@ GLOBAL _ConvertMMXpII32_16BGR555

EXTERN _mmxreturn
SECTION .note.GNU-stack noalloc progbits noexec nowrite
SECTION .data
ALIGN 8
Expand Down Expand Up @@ -383,5 +382,6 @@ _convert_bgr555_cheat:
.L4:
jmp _mmxreturn



%ifidn __OUTPUT_FORMAT__,elf
section .note.GNU-stack noalloc noexec nowrite progbits
%endif
5 changes: 4 additions & 1 deletion src/hermes/x86_main.asm
Expand Up @@ -16,7 +16,6 @@ GLOBAL _x86return
GLOBAL _Hermes_X86_CPU

SECTION .note.GNU-stack noalloc progbits noexec nowrite
SECTION .data
cpu_flags dd 0
Expand Down Expand Up @@ -123,3 +122,7 @@ _Hermes_X86_CPU:

.L1:
ret

%ifidn __OUTPUT_FORMAT__,elf
section .note.GNU-stack noalloc noexec nowrite progbits
%endif
6 changes: 3 additions & 3 deletions src/hermes/x86p_16.asm
Expand Up @@ -27,11 +27,8 @@ GLOBAL _ConvertX86p16_8RGB332
EXTERN _ConvertX86
EXTERN _x86return

SECTION .note.GNU-stack noalloc progbits noexec nowrite
SECTION .text



_ConvertX86p16_16BGR565:

; check short
Expand Down Expand Up @@ -494,3 +491,6 @@ _ConvertX86p16_8RGB332:
.L7 pop ebp
jmp _x86return

%ifidn __OUTPUT_FORMAT__,elf
section .note.GNU-stack noalloc noexec nowrite progbits
%endif
6 changes: 4 additions & 2 deletions src/hermes/x86p_32.asm
Expand Up @@ -25,10 +25,8 @@ GLOBAL _ConvertX86p32_8RGB332

EXTERN _x86return
SECTION .note.GNU-stack noalloc progbits noexec nowrite
SECTION .text


;; _Convert_*
;; Paramters:
;; ESI = source
Expand Down Expand Up @@ -1042,3 +1040,7 @@ _ConvertX86p32_8RGB332:
.L4:
jmp _x86return

%ifidn __OUTPUT_FORMAT__,elf
section .note.GNU-stack noalloc noexec nowrite progbits
%endif

0 comments on commit 1413c3c

Please sign in to comment.