only enable gnu stacks when generating ELF object code
authorMike Frysinger <vapier@gentoo.org>
Tue, 4 Oct 2005 23:31:57 +0000 (23:31 +0000)
committerMike Frysinger <vapier@gentoo.org>
Tue, 4 Oct 2005 23:31:57 +0000 (23:31 +0000)
media-libs/libsdl/files/libsdl-1.2.9-no-exec-stack.patch

index 4dd6e9d79bcc6e702e702c303f36b1e37ac6c3dc..5be3c81664d5d0416c43045079e6659138236f15 100644 (file)
@@ -2,43 +2,53 @@ Fixes from the PaX team to eliminate executable stack markings
 
 --- src/hermes/mmx_main.asm
 +++ src/hermes/mmx_main.asm
-@@ -70,5 +68,4 @@ endconvert:
+@@ -70,5 +68,6 @@ endconvert:
        
        ret             
  
 -
 -
++%ifidn __OUTPUT_FORMAT__,elf
 +section .note.GNU-stack noalloc noexec nowrite progbits
++%endif
 --- src/hermes/mmxp2_32.asm
 +++ src/hermes/mmxp2_32.asm
-@@ -381,6 +381,5 @@ _convert_bgr555_cheat:
+@@ -381,6 +381,7 @@ _convert_bgr555_cheat:
  
  .L4:          
        jmp _mmxreturn
  
 -
 -
++%ifidn __OUTPUT_FORMAT__,elf
 +section .note.GNU-stack noalloc noexec nowrite progbits
++%endif
 --- src/hermes/x86_main.asm
 +++ src/hermes/x86_main.asm
-@@ -123,3 +123,5 @@ _Hermes_X86_CPU:
+@@ -123,3 +123,7 @@ _Hermes_X86_CPU:
  
  .L1:  
        ret
 +
++%ifidn __OUTPUT_FORMAT__,elf
 +section .note.GNU-stack noalloc noexec nowrite progbits
++%endif
 --- src/hermes/x86p_16.asm
 +++ src/hermes/x86p_16.asm
-@@ -494,3 +494,4 @@ _ConvertX86p16_8RGB332:
+@@ -494,3 +494,6 @@ _ConvertX86p16_8RGB332:
  .L7 pop ebp
      jmp _x86return
  
++%ifidn __OUTPUT_FORMAT__,elf
 +section .note.GNU-stack noalloc noexec nowrite progbits
++%endif
 --- src/hermes/x86p_32.asm
 +++ src/hermes/x86p_32.asm
-@@ -1041,3 +1041,5 @@ _ConvertX86p32_8RGB332:
+@@ -1041,3 +1041,7 @@ _ConvertX86p32_8RGB332:
        
  .L4:  
        jmp _x86return
 +
++%ifidn __OUTPUT_FORMAT__,elf
 +section .note.GNU-stack noalloc noexec nowrite progbits
++%endif