nasm 2.09 compatibility SDL-1.2
authorSam Lantinga <slouken@libsdl.org>
Thu, 24 Feb 2011 09:39:23 -0800
branchSDL-1.2
changeset 5392 30e4d724fe98
parent 5334 d898ee5431f5
child 5394 67d3be4ec9f2
nasm 2.09 compatibility nasm-2.09 makes `elf' alias to `elf32', thus __OUTPUT_FORMAT__ macro becomes `elf32' instead of `elf' (on x86). Unmatched macro value causes omitting .note.GNU-stack marker and creates ELFs with executable stack. This is unneeded and attracts security policies like SELinux.
configure.in
src/hermes/mmx_main.asm
src/hermes/mmxp2_32.asm
src/hermes/x86_main.asm
src/hermes/x86p_16.asm
src/hermes/x86p_32.asm
--- a/configure.in	Thu Feb 17 02:31:50 2011 -0800
+++ b/configure.in	Thu Feb 24 09:39:23 2011 -0800
@@ -740,13 +740,13 @@
                   NASMFLAGS="-f macho"
                   ;;
               *)
-                  NASMFLAGS="-f elf"
+                  NASMFLAGS="-f elf32"
                   ;;
             esac
         fi
 
         AC_PATH_PROG(NASM, nasm)
-        echo "%ifidn __OUTPUT_FORMAT__,elf" > unquoted-sections
+        echo "%ifidn __OUTPUT_FORMAT__,elf32" > unquoted-sections
         echo "section .note.GNU-stack noalloc noexec nowrite progbits" >> unquoted-sections
         echo "%endif" >> unquoted-sections
         CompileNASM unquoted-sections || NASM=""
--- a/src/hermes/mmx_main.asm	Thu Feb 17 02:31:50 2011 -0800
+++ b/src/hermes/mmx_main.asm	Thu Feb 24 09:39:23 2011 -0800
@@ -69,6 +69,6 @@
 	
 	ret		
 
-%ifidn __OUTPUT_FORMAT__,elf
+%ifidn __OUTPUT_FORMAT__,elf32
 section .note.GNU-stack noalloc noexec nowrite progbits
 %endif
--- a/src/hermes/mmxp2_32.asm	Thu Feb 17 02:31:50 2011 -0800
+++ b/src/hermes/mmxp2_32.asm	Thu Feb 24 09:39:23 2011 -0800
@@ -400,6 +400,6 @@
 .L4:		
 	retn
 
-%ifidn __OUTPUT_FORMAT__,elf
+%ifidn __OUTPUT_FORMAT__,elf32
 section .note.GNU-stack noalloc noexec nowrite progbits
 %endif
--- a/src/hermes/x86_main.asm	Thu Feb 17 02:31:50 2011 -0800
+++ b/src/hermes/x86_main.asm	Thu Feb 24 09:39:23 2011 -0800
@@ -70,6 +70,6 @@
 
 
 
-%ifidn __OUTPUT_FORMAT__,elf
+%ifidn __OUTPUT_FORMAT__,elf32
 section .note.GNU-stack noalloc noexec nowrite progbits
 %endif
--- a/src/hermes/x86p_16.asm	Thu Feb 17 02:31:50 2011 -0800
+++ b/src/hermes/x86p_16.asm	Thu Feb 24 09:39:23 2011 -0800
@@ -485,6 +485,6 @@
 .L7 pop ebp
     retn
 
-%ifidn __OUTPUT_FORMAT__,elf
+%ifidn __OUTPUT_FORMAT__,elf32
 section .note.GNU-stack noalloc noexec nowrite progbits
 %endif
--- a/src/hermes/x86p_32.asm	Thu Feb 17 02:31:50 2011 -0800
+++ b/src/hermes/x86p_32.asm	Thu Feb 24 09:39:23 2011 -0800
@@ -1040,6 +1040,6 @@
 .L4:	
 	retn
 
-%ifidn __OUTPUT_FORMAT__,elf
+%ifidn __OUTPUT_FORMAT__,elf32
 section .note.GNU-stack noalloc noexec nowrite progbits
 %endif