s390/boot: add build-id to decompressor

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>
This commit is contained in:
Philipp Rudo 2020-11-25 19:08:23 +01:00 committed by Heiko Carstens
parent 613775d62e
commit 7a84ffc047
2 changed files with 2 additions and 1 deletions

View 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)

View file

@ -27,6 +27,7 @@ SECTIONS
*(.rodata.*)
_erodata = . ;
}
NOTES
.data : {
_data = . ;
*(.data)