From 2d7ed392a42bc36d3c206efcc5f44665cbfca530 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Tue, 4 Oct 2005 23:31:57 +0000 Subject: [PATCH] only enable gnu stacks when generating ELF object code --- .../files/libsdl-1.2.9-no-exec-stack.patch | 20 ++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/media-libs/libsdl/files/libsdl-1.2.9-no-exec-stack.patch b/media-libs/libsdl/files/libsdl-1.2.9-no-exec-stack.patch index 4dd6e9d79bcc..5be3c81664d5 100644 --- a/media-libs/libsdl/files/libsdl-1.2.9-no-exec-stack.patch +++ b/media-libs/libsdl/files/libsdl-1.2.9-no-exec-stack.patch @@ -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 -- 2.26.2