mirror of
https://github.com/ibm-s390-linux/s390-tools.git
synced 2026-08-05 02:14:52 +00:00
zipl/src: remove no-pie and noexecstack compiler and linker flags
Only the bootloaders cannot be built as PIE and for that there are
already the -no-pie linker and compiler flags set by the boot/Makefile.
In addition, remove the `noexecstack` linker flag as it has no use
anymore (see commit 518bf7d7357 ("zipl/boot: use
`--no-warn-rwx-segments` linker flag")). It was originally introduced to
declare the ELF segment of the bootloader stack as non-executable. But
this ELF attribute had no effect for multiple reasons:
1. ALL_LDFLAGS is not used for the bootloaders
2. no ELF loader is used for the bootloaders that would take this ELF
attribute into account
This fixes the problem of overriding `-fPIE` set by the distributor.
Reviewed-by: Steffen Eiden <seiden@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:
committed by
Jan Höppner
parent
e98f9b9c4a
commit
5a848c98bb
+1
-2
@@ -4,8 +4,7 @@ include ../../common.mak
|
||||
ALL_CPPFLAGS += -I../include -I../boot \
|
||||
-DZFCPDUMP_IMAGE="STRINGIFY($(ZFCPDUMP_DIR)/$(ZFCPDUMP_IMAGE))" \
|
||||
-DZFCPDUMP_INITRD="STRINGIFY($(ZFCPDUMP_DIR)/$(ZFCPDUMP_INITRD))" \
|
||||
-D_FILE_OFFSET_BITS=64 $(NO_PIE_CFLAGS) -DBUILD_PATH="../boot"
|
||||
ALL_LDFLAGS += -Wl,-z,noexecstack $(NO_PIE_LDFLAGS)
|
||||
-D_FILE_OFFSET_BITS=64 -DBUILD_PATH="../boot"
|
||||
|
||||
libs = $(rootdir)/libutil/libutil.a \
|
||||
$(rootdir)/libvtoc/libvtoc.a \
|
||||
|
||||
Reference in New Issue
Block a user