From 71fe58111cc48c03305375b86bef5c2f078e01f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20H=C3=B6ppner?= Date: Mon, 28 Feb 2022 11:27:31 +0100 Subject: [PATCH] s390-tools: Clean up NO_PIE_* flags MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Remove NO_PIE_LINKFLAGS and follow the naming convention by using LDFLAGS for linker flags. Replace all occurrences accordingly. Reviewed-by: Marc Hartmayer Reviewed-by: Stefan Haberland Signed-off-by: Jan Höppner --- common.mak | 2 -- genprotimg/boot/Makefile | 6 +++--- zipl/boot/Makefile | 10 +++++----- 3 files changed, 8 insertions(+), 10 deletions(-) diff --git a/common.mak b/common.mak index dd4586ad..af600e0b 100644 --- a/common.mak +++ b/common.mak @@ -251,11 +251,9 @@ export AS LD CC CPP AR NM STRIP OBJCOPY OBJDUMP INSTALL CFLAGS CXXFLAGS \ ifneq ($(shell $(CC_SILENT) -dumpspecs 2>/dev/null | grep -e '[^f]no-pie'),) NO_PIE_CFLAGS := -fno-pie - NO_PIE_LINKFLAGS := -no-pie NO_PIE_LDFLAGS := -no-pie else NO_PIE_CFLAGS := - NO_PIE_LINKFLAGS := NO_PIE_LDFLAGS := endif diff --git a/genprotimg/boot/Makefile b/genprotimg/boot/Makefile index f2bc25c3..f957a706 100644 --- a/genprotimg/boot/Makefile +++ b/genprotimg/boot/Makefile @@ -74,9 +74,9 @@ stage3b_reloc.elf: %.elf: %.o case $* in \ - stage3a) SFLAGS="$(NO_PIE_LINKFLAGS) -nostdlib -Wl,-T,stage3a.lds";; \ - stage3b) SFLAGS="$(NO_PIE_LINKFLAGS) -nostdlib -Wl,-T,stage3b.lds";; \ - stage3b_reloc) SFLAGS="$(NO_PIE_LINKFLAGS) -nostdlib -Wl,-estage3b_reloc_start,-Ttext,0";; \ + stage3a) SFLAGS="$(NO_PIE_LDFLAGS) -nostdlib -Wl,-T,stage3a.lds";; \ + stage3b) SFLAGS="$(NO_PIE_LDFLAGS) -nostdlib -Wl,-T,stage3b.lds";; \ + stage3b_reloc) SFLAGS="$(NO_PIE_LDFLAGS) -nostdlib -Wl,-estage3b_reloc_start,-Ttext,0";; \ esac; \ $(LINK) $$SFLAGS -m64 $(filter %.o, $^) -o $@ @chmod a-x $@ diff --git a/zipl/boot/Makefile b/zipl/boot/Makefile index e0c041e7..92f2ccbb 100644 --- a/zipl/boot/Makefile +++ b/zipl/boot/Makefile @@ -68,11 +68,11 @@ stage3.exec: head.o stage3.o kdump3.o libc.o ebcdic.o ebcdic_conv.o sclp.o \ }' \ ); \ case $$STAGE in \ - 0) SFLAGS="$(NO_PIE_LINKFLAGS) -nostdlib -Wl,-Ttext,0";; \ - 1) SFLAGS="$(NO_PIE_LINKFLAGS) -nostdlib -Wl,-Ttext,0x18";; \ - 1b) SFLAGS="$(NO_PIE_LINKFLAGS) -nostdlib -Wl,-Ttext,0xE000";; \ - 2) SFLAGS="$(NO_PIE_LINKFLAGS) -nostdlib -Wl,-T,stage2.lds";; \ - 3) SFLAGS="$(NO_PIE_LINKFLAGS) -nostdlib -Wl,-T,stage3.lds";; \ + 0) SFLAGS="$(NO_PIE_LDFLAGS) -nostdlib -Wl,-Ttext,0";; \ + 1) SFLAGS="$(NO_PIE_LDFLAGS) -nostdlib -Wl,-Ttext,0x18";; \ + 1b) SFLAGS="$(NO_PIE_LDFLAGS) -nostdlib -Wl,-Ttext,0xE000";; \ + 2) SFLAGS="$(NO_PIE_LDFLAGS) -nostdlib -Wl,-T,stage2.lds";; \ + 3) SFLAGS="$(NO_PIE_LDFLAGS) -nostdlib -Wl,-T,stage3.lds";; \ esac; \ $(LINK) $$SFLAGS -m64 $(filter %.o, $^) -o $@