mirror of
https://github.com/genodelabs/genode.git
synced 2025-01-29 15:44:02 +00:00
Let linker assume stacks are non-executable
In our binaries, the .note.GNU-stack section is missing, which is okay as we do not interpret these sections anyway and map stack pages non-executable per default. Issue #4827
This commit is contained in:
parent
823349fffb
commit
6b2338257d
@ -211,8 +211,9 @@ CC_CXX_OPT += $(lastword $(CC_CXX_OPT_STD) $(CC_CXX_OPT_STD_$(subst .,_,$*)))
|
||||
#
|
||||
LD_OPT_GC_SECTIONS ?= -gc-sections
|
||||
LD_OPT_ALIGN_SANE = -z max-page-size=0x1000
|
||||
LD_OPT_NX_STACK = -z noexecstack
|
||||
LD_OPT_PREFIX := -Wl,
|
||||
LD_OPT += $(LD_MARCH) $(LD_OPT_GC_SECTIONS) $(LD_OPT_ALIGN_SANE)
|
||||
LD_OPT += $(LD_MARCH) $(LD_OPT_GC_SECTIONS) $(LD_OPT_ALIGN_SANE) $(LD_OPT_NX_STACK)
|
||||
CXX_LINK_OPT += $(addprefix $(LD_OPT_PREFIX),$(LD_OPT))
|
||||
CXX_LINK_OPT += $(LD_OPT_NOSTDLIB)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user