--- nasm.inc 2008/12/04 18:30:36 1.5 +++ nasm.inc 2009/09/16 17:07:58 1.7 @@ -19,7 +19,7 @@ ; * along with this program ; if not, write to the Free Software ; * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ; * -; * $Id: nasm.inc,v 1.5 2008/12/04 18:30:36 Isibaar Exp $ +; * $Id: nasm.inc,v 1.7 2009/09/16 17:07:58 Isibaar Exp $ ; * ; ***************************************************************************/ @@ -175,7 +175,11 @@ %endmacro %macro TEXT 0 +%ifidn __OUTPUT_FORMAT__,macho + SECTION .text align=SECTION_ALIGN +%else SECTION .rotext align=SECTION_ALIGN +%endif %endmacro %macro cglobal 1 @@ -199,3 +203,12 @@ %endif %endif %endmacro + +%macro NON_EXEC_STACK 0 +%ifidn __OUTPUT_FORMAT__,elf +section .note.GNU-stack noalloc noexec nowrite progbits +%endif +%ifidn __OUTPUT_FORMAT__,elf64 +section .note.GNU-stack noalloc noexec nowrite progbits +%endif +%endmacro