author Sam Lantinga <>
Tue, 01 Nov 2005 23:19:59 +0000
changeset 1166 da33b7e6d181
parent 0 74212992fb08
child 1199 2d6dc7de1145
permissions -rw-r--r--
Date: Tue, 1 Nov 2005 20:25:10 +0100 From: Dirk Mueller Subject: [PATCH] build SDL with nonexecutable stack libSDL is by default marked with an executable stack, which it doesn't actually need. the reason for this is that there are assembler files in the source tree not properly annotated with the "noexec stack" section. As such the linker does a safe-fallback and marks the whole lib as "requires executable stack". the patch below removes this by adding annotations. As far as I can see it shouldn't break anything.

; mmx format converter main loops for HERMES
; Some routines Copyright (c) 1998 Christian Nentwich (
; This source code is licensed under the GNU LGPL
; Please refer to the file COPYING.LIB contained in the distribution for
; licensing conditions		


GLOBAL _mmxreturn

SECTION .note.GNU-stack noalloc progbits noexec nowrite
;; _ConvertMMX:	 
;; [ESP+8] ConverterInfo*
;; --------------------------------------------------------------------------
;; ConverterInfo (ebp+..)
;;   0:	void *s_pixels
;;   4:	int s_width
;;   8:	int s_height
;;  12:	int s_add
;;  16:	void *d_pixels
;;  20:	int d_width
;;  24:	int d_height
;;  28:	int d_add
;;  32:	void (*converter_function)() 
;;  36: int32 *lookup
	push ebp
	mov ebp,esp

; Save the registers used by the blitters, necessary for optimized code

	mov eax,[ebp+8]

        cmp dword [eax+4],BYTE 0
	je endconvert
	mov ebp,eax
	mov esi,[ebp+0]
	mov edi,[ebp+16]
	mov ecx,[ebp+4]

	jmp [ebp+32]

	add esi,[ebp+12]
	add edi,[ebp+28]
	dec dword  [ebp+8]
	jnz y_loop

; Restore the registers used by the blitters, necessary for optimized code

	pop ebp