zipl/boot: use --no-warn-rwx-segments linker flag

This disables the following warning `ld: warning: stage3.exec has a LOAD
segment with RWX permissions` for newer linker. This changes nothing in
functionality for the zipl bootloaders, since only the binaries and not
the ELF files are actually used.

Acked-by: Eduard Shishkin <edward6@linux.ibm.com>
Reviewed-by: Stefan Haberland <sth@linux.ibm.com>
Signed-off-by: Marc Hartmayer <mhartmay@linux.ibm.com>
Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
This commit is contained in:
Marc Hartmayer
2023-01-18 16:41:09 +00:00
committed by Jan Höppner
parent 3d168fac14
commit 4518bf7d73
2 changed files with 15 additions and 1 deletions

View File

@@ -145,6 +145,20 @@ then \
exit 1; \
fi
#
# Test for linker option
#
# $1: Linker option
#
# Returns the linker option if available and nothing otherwise
#
define test_linker_flag
$(shell printf "int main(void) {return 0;}\n" | \
( $(CC) "-Wl,$1" -o /dev/null -x c - ) >/dev/null 2>&1 && printf -- '-Wl,%s' "$1")
endef
NO_WARN_RWX_SEGMENTS_LDFLAGS := $(call test_linker_flag,"--no-warn-rwx-segments")
#
# Support alternate install root
#