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 $@