s390/boot: add build-id to decompressor
authorPhilipp Rudo <prudo@linux.ibm.com>
Wed, 25 Nov 2020 18:08:23 +0000 (19:08 +0100)
committerHeiko Carstens <hca@linux.ibm.com>
Wed, 9 Dec 2020 20:02:07 +0000 (21:02 +0100)
More and more functionality from the early boot phase gets carried over
to the decompressor. With this the complexity of the code and thus the
chance to introduce bugs increases. In order to be able to debug these
early boot bugs the distributions have to package the decompressors
vmlinux together with the other debuginfos. However for that the
distributions require the vmlinux to contain a build-id.

Per default the section containing the build-id is placed first in the
section table. So make sure to move it behind the .text section
otherwise the image would be unbootable.

Signed-off-by: Philipp Rudo <prudo@linux.ibm.com>
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
arch/s390/boot/compressed/Makefile
arch/s390/boot/compressed/vmlinux.lds.S

index e0502222706a1e0f7422d8aeb64837ad413e40f5..de18dab518bb6b6fdcf9625d60ef17d2cf5f1576 100644 (file)
@@ -23,7 +23,7 @@ OBJCOPYFLAGS :=
 OBJECTS := $(addprefix $(obj)/,$(obj-y))
 OBJECTS_ALL := $(addprefix $(obj)/,$(obj-all))
 
-LDFLAGS_vmlinux := --oformat $(LD_BFD) -e startup -T
+LDFLAGS_vmlinux := --oformat $(LD_BFD) -e startup --build-id=sha1 -T
 $(obj)/vmlinux: $(obj)/vmlinux.lds $(objtree)/arch/s390/boot/startup.a $(OBJECTS_ALL) FORCE
        $(call if_changed,ld)
 
index 152ac6f875c0a4b26bf9caa6cc02a9dd9dda0838..27a09c1c78f6a701fac12b0f9d9150a389675ad6 100644 (file)
@@ -27,6 +27,7 @@ SECTIONS
                *(.rodata.*)
                _erodata = . ;
        }
+       NOTES
        .data : {
                _data = . ;
                *(.data)