mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 10:11:27 +01:00
xen: add non-executable stack note uniformly
Currently the -Wa,--noexecstack parameter is only passed to the compiler when building assembly files, as the assembler doesn't add such note for stack attributes. However, the default addition of the .note.GNU-stack section is dependent on the ELF target used. Adjust the passing of -Wa,--noexecstack so it's added to CFLAGS instead of AFLAGS, and hence such section is also added to object files generated from .c sources. This fixes the complains from the linker about missing .note.GNU-stack section when building x86-64 Xen on Darwin platforms. Note we could instead pass `-z noexecstack` to the linker, but that however would mask any possible errors or unintended mismatches from previous steps. Suggested-by: Jan Beulich <jbeulich@suse.com> Signed-off-by: Roger Pau Monné <roger.pau@citrix.com> Acked-by: Jan Beulich <jbeulich@suse.com>
This commit is contained in:
1 parent
c13335b5c1
commit
3dfd77003c
1 file changed
+1
-1
+1
-1
@@ -413,7 +413,7 @@ ifneq ($(CONFIG_CC_IS_CLANG),y)
|
||||
CFLAGS += -Wa,--strip-local-absolute
|
||||
endif
|
||||
|
||||
$(call cc-option-add,AFLAGS,CC,-Wa$$(comma)--noexecstack)
|
||||
$(call cc-option-add,CFLAGS,CC,-Wa$$(comma)--noexecstack)
|
||||
|
||||
LDFLAGS-$(call ld-option,--warn-rwx-segments) += --no-warn-rwx-segments
|
||||
|
||||
|
||||