From 5a00c8d7c30006fc94d817bf520df7fd2aacf875 Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Tue, 1 Nov 2005 23:19:59 +0000 Subject: [PATCH] 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. --HG-- extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401169 --- src/hermes/mmx_main.asm | 1 + src/hermes/mmxp2_32.asm | 1 + src/hermes/x86_main.asm | 2 +- src/hermes/x86p_16.asm | 2 +- src/hermes/x86p_32.asm | 3 ++- 5 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/hermes/mmx_main.asm b/src/hermes/mmx_main.asm index b1d2dbc7f..edf9385d6 100644 --- a/src/hermes/mmx_main.asm +++ b/src/hermes/mmx_main.asm @@ -13,6 +13,7 @@ GLOBAL _ConvertMMX GLOBAL _mmxreturn +SECTION .note.GNU-stack noalloc progbits noexec nowrite SECTION .text ;; _ConvertMMX: diff --git a/src/hermes/mmxp2_32.asm b/src/hermes/mmxp2_32.asm index b9152b962..8999bae8a 100644 --- a/src/hermes/mmxp2_32.asm +++ b/src/hermes/mmxp2_32.asm @@ -29,6 +29,7 @@ GLOBAL _ConvertMMXpII32_16BGR555 EXTERN _mmxreturn +SECTION .note.GNU-stack noalloc progbits noexec nowrite SECTION .data ALIGN 8 diff --git a/src/hermes/x86_main.asm b/src/hermes/x86_main.asm index 391630708..e152c6a64 100644 --- a/src/hermes/x86_main.asm +++ b/src/hermes/x86_main.asm @@ -16,7 +16,7 @@ GLOBAL _x86return GLOBAL _Hermes_X86_CPU - +SECTION .note.GNU-stack noalloc progbits noexec nowrite SECTION .data cpu_flags dd 0 diff --git a/src/hermes/x86p_16.asm b/src/hermes/x86p_16.asm index fd28a2b06..d7ee7400e 100644 --- a/src/hermes/x86p_16.asm +++ b/src/hermes/x86p_16.asm @@ -27,7 +27,7 @@ GLOBAL _ConvertX86p16_8RGB332 EXTERN _ConvertX86 EXTERN _x86return - +SECTION .note.GNU-stack noalloc progbits noexec nowrite SECTION .text diff --git a/src/hermes/x86p_32.asm b/src/hermes/x86p_32.asm index 648fec4d2..4be2d6230 100644 --- a/src/hermes/x86p_32.asm +++ b/src/hermes/x86p_32.asm @@ -24,7 +24,8 @@ GLOBAL _ConvertX86p32_16BGR555 GLOBAL _ConvertX86p32_8RGB332 EXTERN _x86return - + +SECTION .note.GNU-stack noalloc progbits noexec nowrite SECTION .text