https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107971
Bug ID: 107971 Summary: linking an assembler object creates an executable stack Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: cont...@alexander-pick.com Target Milestone: --- Created attachment 54011 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=54011&action=edit simple testcase for the issue I encountered a strange behavior with gcc and linking an assembler object. Doing so will create a binary with executable stack. A testcase is attached. The code will compile a very simple assembler file as an object and link it to an object compiled from C. The binary will have an executable stack by default which isn't that great from a security point of view. Setting "-z noexecstack" as a workaround is the only way to prevent this. 31: STACK off 0x0000000000000000 vaddr 0x0000000000000000 paddr 0x0000000000000000 align 2**4 32- filesz 0x0000000000000000 memsz 0x0000000000000000 flags rwx