diff --git a/genprotimg/boot/Makefile b/genprotimg/boot/Makefile index d71afdb1..1ccc8b26 100644 --- a/genprotimg/boot/Makefile +++ b/genprotimg/boot/Makefile @@ -75,11 +75,11 @@ stage3b_reloc.elf: %.elf: %.o case $* in \ - 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";; \ + stage3a) SFLAGS="-Wl,-T,stage3a.lds";; \ + stage3b) SFLAGS="-Wl,-T,stage3b.lds";; \ + stage3b_reloc) SFLAGS="-Wl,-estage3b_reloc_start,-Ttext,0";; \ esac; \ - $(LINK) $$SFLAGS -m64 -static $(filter %.o, $^) -o $@ + $(LINK) $$SFLAGS $(NO_PIE_LDFLAGS) -m64 -static -nostdlib $(filter %.o, $^) -o $@ @chmod a-x $@ %.bin: %.elf diff --git a/zipl/boot/Makefile b/zipl/boot/Makefile index 04a58952..c2ec76ae 100644 --- a/zipl/boot/Makefile +++ b/zipl/boot/Makefile @@ -68,13 +68,13 @@ stage3.exec: head.o stage3.o kdump3.o libc.o ebcdic.o ebcdic_conv.o sclp.o \ }' \ ); \ case $$STAGE in \ - 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";; \ + 0) SFLAGS="-Wl,-Ttext,0";; \ + 1) SFLAGS="-Wl,-Ttext,0x18";; \ + 1b) SFLAGS="-Wl,-Ttext,0xE000";; \ + 2) SFLAGS="-Wl,-T,stage2.lds";; \ + 3) SFLAGS="-Wl,-T,stage3.lds";; \ esac; \ - $(LINK) $$SFLAGS -m64 -static $(filter %.o, $^) -o $@ + $(LINK) $$SFLAGS $(NO_PIE_LDFLAGS) -m64 -static -nostdlib $(filter %.o, $^) -o $@ %.bin: %.exec $(OBJCOPY) -O binary \