121bd3e056
- Apllied the following patches (bsc#1208527, bsc#1206173) * s390-tools-sles15sp5-01-zipl-boot-discard-.eh_frame-and-.interp-input-sectio.patch * s390-tools-sles15sp5-02-zipl-boot-declare-that-no-executable-stack-is-requir.patch * s390-tools-sles15sp5-03-zipl-boot-use-no-warn-rwx-segments-linker-flag.patch * s390-tools-sles15sp5-04-zipl-boot-disable-build-id.patch * s390-tools-sles15sp5-05-zipl-boot-simplify-objcopy-commands.patch * s390-tools-sles15sp5-06-zipl-move-STAGE2_MAX_SIZE-and-STAGE1B_LOAD_ADDR-to-l.patch * s390-tools-sles15sp5-07-zipl-boot-use-linker-scripts-for-all-bootloaders.patch * s390-tools-sles15sp5-08-genprotimg-boot-declare-that-no-executable-stack-is-.patch * s390-tools-sles15sp5-09-genprotimg-boot-use-no-warn-rwx-segments-linker-flag.patch * s390-tools-sles15sp5-10-genprotimg-boot-disable-build-id.patch * s390-tools-sles15sp5-11-genprotimg-boot-Makefile-simplify-objcopy-command.patch * s390-tools-sles15sp5-12-genprotimg-boot-improve-linker-scripts.patch * s390-tools-sles15sp5-13-genprotimg-boot-stage3b-add-size-check-to-the-linker.patch * s390-tools-sles15sp5-14-genprotimg-boot-stage3b_reloc.bin-add-linker-script.patch * s390-tools-sles15sp5-15-zipl-Embed-loader-data-directly-into-boot-object.patch OBS-URL: https://build.opensuse.org/request/show/1067101 OBS-URL: https://build.opensuse.org/package/show/Base:System/s390-tools?expand=0&rev=157
66 lines
1.7 KiB
Diff
66 lines
1.7 KiB
Diff
---
|
|
genprotimg/boot/Makefile | 14 ++++----------
|
|
genprotimg/boot/stage3b_reloc.S | 4 ++--
|
|
genprotimg/boot/stage3b_reloc.lds.S | 19 +++++++++++++++++++
|
|
3 files changed, 25 insertions(+), 12 deletions(-)
|
|
|
|
--- a/genprotimg/boot/Makefile
|
|
+++ b/genprotimg/boot/Makefile
|
|
@@ -69,17 +69,11 @@ endif
|
|
|
|
stage3b_reloc.o: stage3b.bin
|
|
|
|
-stage3a.elf: head.o stage3a_init.o stage3a.o stage3a.lds $(ZIPL_OBJS)
|
|
-stage3b.elf: head.o stage3b.o stage3b.lds $(ZIPL_OBJS)
|
|
-stage3b_reloc.elf:
|
|
+stage3a.elf: head.o stage3a_init.o $(ZIPL_OBJS)
|
|
+stage3b.elf: head.o $(ZIPL_OBJS)
|
|
|
|
-%.elf: %.o
|
|
- case $* in \
|
|
- stage3a) SFLAGS="-Wl,-T,stage3a.lds";; \
|
|
- stage3b) SFLAGS="-Wl,-T,stage3b.lds";; \
|
|
- stage3b_reloc) SFLAGS="-Wl,-estage3b_reloc_start,-Ttext,0";; \
|
|
- esac; \
|
|
- $(LINK) $$SFLAGS $(NO_PIE_LDFLAGS) $(NO_WARN_RWX_SEGMENTS_LDFLAGS) -Wl,--build-id=none -m64 -static -nostdlib $(filter %.o, $^) -o $@
|
|
+%.elf: %.lds %.o
|
|
+ $(LINK) $(NO_PIE_LDFLAGS) $(NO_WARN_RWX_SEGMENTS_LDFLAGS) -Wl,-T,$< -Wl,--build-id=none -m64 -static -nostdlib $(filter %.o, $^) -o $@
|
|
@chmod a-x $@
|
|
|
|
%.bin: %.elf
|
|
--- a/genprotimg/boot/stage3b_reloc.S
|
|
+++ b/genprotimg/boot/stage3b_reloc.S
|
|
@@ -22,8 +22,8 @@
|
|
|
|
.org 0x0
|
|
.section .text.start
|
|
-.globl stage3b_reloc_start
|
|
-stage3b_reloc_start:
|
|
+.globl _start
|
|
+_start:
|
|
/* Might be called after a diag308 so better set
|
|
* architecture and addressing mode
|
|
*/
|
|
--- /dev/null
|
|
+++ b/genprotimg/boot/stage3b_reloc.lds.S
|
|
@@ -0,0 +1,19 @@
|
|
+OUTPUT_FORMAT("elf64-s390", "elf64-s390", "elf64-s390")
|
|
+OUTPUT_ARCH(s390:64-bit)
|
|
+
|
|
+ENTRY(_start)
|
|
+
|
|
+SECTIONS
|
|
+{
|
|
+ .text : {
|
|
+ *(.text.start)
|
|
+ *(.text .text.*)
|
|
+ }
|
|
+
|
|
+ /* Sections to be discarded */
|
|
+ /DISCARD/ : {
|
|
+ *(.eh_frame)
|
|
+ *(.interp)
|
|
+ *(.note.GNU-stack)
|
|
+ }
|
|
+}
|