make bins built with asm disable exec stack #98
Add the `section .note.GNU-stack` markers to .asm files built with nasm to make sure the final executables do not have an executable stack. This is described here: https://wiki.gentoo.org/wiki/Hardened/GNU_stack_quickstart
This commit is contained in:
parent
f56794e8a3
commit
5d4ce82d54
|
@ -24,7 +24,15 @@
|
|||
|
||||
;%define FAR_POINTER
|
||||
|
||||
|
||||
%ifidn __OUTPUT_FORMAT__,elf
|
||||
section .note.GNU-stack noalloc noexec nowrite progbits
|
||||
%endif
|
||||
%ifidn __OUTPUT_FORMAT__,elf32
|
||||
section .note.GNU-stack noalloc noexec nowrite progbits
|
||||
%endif
|
||||
%ifidn __OUTPUT_FORMAT__,elf64
|
||||
section .note.GNU-stack noalloc noexec nowrite progbits
|
||||
%endif
|
||||
|
||||
BITS 32
|
||||
GLOBAL __2xSaILine
|
||||
|
|
|
@ -1,3 +1,13 @@
|
|||
%ifidn __OUTPUT_FORMAT__,elf
|
||||
section .note.GNU-stack noalloc noexec nowrite progbits
|
||||
%endif
|
||||
%ifidn __OUTPUT_FORMAT__,elf32
|
||||
section .note.GNU-stack noalloc noexec nowrite progbits
|
||||
%endif
|
||||
%ifidn __OUTPUT_FORMAT__,elf64
|
||||
section .note.GNU-stack noalloc noexec nowrite progbits
|
||||
%endif
|
||||
|
||||
%ifdef __AMD64__
|
||||
bits 64
|
||||
%else
|
||||
|
|
Loading…
Reference in New Issue