Commit 04158cd40e184e2325a7a0e5fef232cce038cc4b

Brent Cook 2014-12-21T23:14:02

do not mark GNU_STACK WX in ELFs generated from assembly When generating ELF objects from assembly, gcc and clang mark the GNU_STACK program headers as RWX by default. This is a security issue, so we make sure it is marked only RW. This modifies Anthony G. Basile's original patch for Linux to set .note.GNU-stack whenever the assembler supports it. It is surprising that any modern toolchain would enable an executable stack without an explicit request. The number of programs that need an executable stack is surely much smaller than the number of programs that include assembly.