From 75d4317f208da1e25afd520fe43a1786333388ad Mon Sep 17 00:00:00 2001 From: Stefan Haberland Date: Mon, 8 Apr 2019 17:52:43 +0200 Subject: [PATCH] zipl: pad stage3 binary MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The stage 3 loader size has to be a multiple of the filesystem blocksize so that the signature maps with the later in memory stage 3 loader. The lowest common blocksize is 4k so the image is padded to a 4k boundary. Signed-off-by: Stefan Haberland Acked-by: Peter Oberparleiter Signed-off-by: Jan Höppner --- zipl/boot/Makefile | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/zipl/boot/Makefile b/zipl/boot/Makefile index 8d8cef80..35cd7350 100644 --- a/zipl/boot/Makefile +++ b/zipl/boot/Makefile @@ -77,6 +77,22 @@ stage3.exec: head.o stage3.o kdump3.o libc.o sclp.o sclp_stage3.o \ --only-section=.fixup \ $< $@ +stage3.bin: stage3.exec + $(OBJCOPY) -O binary \ + --only-section=.stage2.head \ + --only-section=.text.dummy \ + --only-section=.text.start \ + --only-section=.text \ + --only-section=.ex_table \ + --only-section=.data \ + --only-section=.rodata.str1.2 \ + --only-section=.rodata \ + --only-section=.stage2dump.tail \ + --only-section=.eckd2dump_mv.tail \ + --only-section=.fixup \ + --pad-to=0xf000 \ + $< $@ + data.o: $(FILES) $(LD) $(NO_PIE_LDFLAGS) -r -b binary -o data.o $(FILES)