[SDL] yasm compile issue (1.2 & trunk)
Charles Bailey
sdl at hashpling.org
Sat Dec 23 00:07:34 PST 2006
Hi,
I've been trying out SDL-1.2 and was pleasantly surprised that it chose
yasm over nasm as the default intel syntax assembler but less pleasantly
surprised that it didn't actually compile with its preferred assembler.
I've logged the particular problem as a nasm compatibility issue over at
tortall.net but I thought you might be interested in a patch to fix the
issue.
It looks like this has been broken since the "non-executable stack" fix
went in. Does anyone test with yasm? The patch is against the trunk
(1.3?) but a fix against 1.2 would be nice. Is 1.2 still open for fixes?
I have tested the patch as compiling and working (i.e. correct object
file sections being created) with both current yasm (0.5.0 + recent
fixes) and nasm from fedora core 5:
$ nasm -v
NASM version 0.98.39 compiled on Feb 12 2006
A quick note on the patch. You can't leave the quotes in the section
name for nasm as, although it compiles, the quotes make it into the
section name of the resultant object file which is wrong.
Thanks,
Charles.
$ svn info
Path: .
URL: svn://libsdl.org/trunk/SDL
Repository Root: svn://libsdl.org
Repository UUID: c70aab31-4412-0410-b14c-859654838e24
Revision: 2926
Index: src/hermes/mmx_main.asm
===================================================================
--- src/hermes/mmx_main.asm (revision 2926)
+++ src/hermes/mmx_main.asm (working copy)
@@ -72,5 +72,9 @@
ret
%ifidn __OUTPUT_FORMAT__,elf
+%ifdef __YASM_MAJOR__
+section ".note.GNU-stack" noalloc noexec nowrite progbits
+%else
section .note.GNU-stack noalloc noexec nowrite progbits
%endif
+%endif
Index: src/hermes/mmxp2_32.asm
===================================================================
--- src/hermes/mmxp2_32.asm (revision 2926)
+++ src/hermes/mmxp2_32.asm (working copy)
@@ -403,5 +403,9 @@
jmp _mmxreturn
%ifidn __OUTPUT_FORMAT__,elf
+%ifdef __YASM_MAJOR__
+section ".note.GNU-stack" noalloc noexec nowrite progbits
+%else
section .note.GNU-stack noalloc noexec nowrite progbits
%endif
+%endif
Index: src/hermes/x86_main.asm
===================================================================
--- src/hermes/x86_main.asm (revision 2926)
+++ src/hermes/x86_main.asm (working copy)
@@ -118,5 +118,9 @@
ret
%ifidn __OUTPUT_FORMAT__,elf
+%ifdef __YASM_MAJOR__
+section ".note.GNU-stack" noalloc noexec nowrite progbits
+%else
section .note.GNU-stack noalloc noexec nowrite progbits
%endif
+%endif
Index: src/hermes/x86p_32.asm
===================================================================
--- src/hermes/x86p_32.asm (revision 2926)
+++ src/hermes/x86p_32.asm (working copy)
@@ -1043,5 +1043,9 @@
jmp _x86return
%ifidn __OUTPUT_FORMAT__,elf
+%ifdef __YASM_MAJOR__
+section ".note.GNU-stack" noalloc noexec nowrite progbits
+%else
section .note.GNU-stack noalloc noexec nowrite progbits
%endif
+%endif
Index: src/hermes/x86p_16.asm
===================================================================
--- src/hermes/x86p_16.asm (revision 2926)
+++ src/hermes/x86p_16.asm (working copy)
@@ -487,5 +487,9 @@
jmp _x86return
%ifidn __OUTPUT_FORMAT__,elf
+%ifdef __YASM_MAJOR__
+section ".note.GNU-stack" noalloc noexec nowrite progbits
+%else
section .note.GNU-stack noalloc noexec nowrite progbits
%endif
+%endif
More information about the SDL
mailing list