| Summary: | nasm-2.09 changed __OUTPUT_FORMAT__ derivation | ||
|---|---|---|---|
| Product: | SDL | Reporter: | Petr Pisar <ppisar> |
| Component: | build | Assignee: | Sam Lantinga <slouken> |
| Status: | RESOLVED FIXED | QA Contact: | Sam Lantinga <slouken> |
| Severity: | normal | ||
| Priority: | P2 | ||
| Version: | HG 1.2 | ||
| Hardware: | x86 | ||
| OS: | Linux | ||
| Attachments: | Fix | ||
Created attachment 588 [details]
Fix
This patch changes the `elf' format to `elf32' (as the code is used on x86 only). It can be compiled with old and with new nasm successfully. Also I believe it still works with yasm, as it supports `elf32' format too.
This fix is in, thanks! http://hg.libsdl.org/SDL/rev/30e4d724fe98 |
While compiling SDL-1.2.14 with newer nasm (Hermes library in x86 assembler is embedded), I found the GNU-stack notice is missing resulting in library marked as requiring executable stack. I discovered nasm-2.09 changed a way how output format argument (nasm -f elf) becomes a __OUTPUT_FORMAT__ macro used to conditionalize the GNU-stack section: %ifidn __OUTPUT_FORMAT__,elf section .note.GNU-stack noalloc noexec nowrite progbits %endif Olde nasm defined __OUTPUT_FORMAT__ as `elf'. Version 2.09 defines it as `elf32' on x86: Short aliases \c{win}, \c{elf} and \c{macho} for output formats are introduced. Each stands for \c{win32}, \c{elf32} and \c{macho32} accordingly. Thus SDL compiled with newer nasm misses the section and linker assumes the stack is executable.