diff options
author | Nathan Chancellor <nathan@kernel.org> | 2024-02-07 17:14:53 -0700 |
---|---|---|
committer | Heiko Carstens <hca@linux.ibm.com> | 2024-02-14 13:50:52 +0100 |
commit | 2151fd9a6d4ff8732a32f9ef2498fb7b95a0da29 (patch) | |
tree | 1cab0e98c44a2c2ff7c9b06571b635b112bb7f19 /arch/s390/boot | |
parent | 340750c13c3af2fc8cc4f993823a0b82b8a22845 (diff) | |
download | linux-stable-2151fd9a6d4ff8732a32f9ef2498fb7b95a0da29.tar.gz linux-stable-2151fd9a6d4ff8732a32f9ef2498fb7b95a0da29.tar.bz2 linux-stable-2151fd9a6d4ff8732a32f9ef2498fb7b95a0da29.zip |
s390/boot: add support for CONFIG_LD_ORPHAN_WARN
arch/s390/boot/vmlinux uses a different linker script and build rules
than the main vmlinux, so the '--orphan-handling' flag is not applied to
it. Add support for '--orphan-handling' so that all sections are
properly described in the linker script, which helps eliminate bugs
between linker implementations having different orphan section
heuristics.
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
Tested-by: Justin Stitt <justinstitt@google.com>
Link: https://lore.kernel.org/r/20240207-s390-lld-and-orphan-warn-v1-1-8a665b3346ab@kernel.org
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
Diffstat (limited to 'arch/s390/boot')
-rw-r--r-- | arch/s390/boot/Makefile | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/arch/s390/boot/Makefile b/arch/s390/boot/Makefile index c7c81e5f9218..ace0bda1ad24 100644 --- a/arch/s390/boot/Makefile +++ b/arch/s390/boot/Makefile @@ -73,11 +73,12 @@ $(obj)/bzImage: $(obj)/vmlinux $(obj)/section_cmp.boot.data $(obj)/section_cmp.b $(obj)/section_cmp%: vmlinux $(obj)/vmlinux FORCE $(call if_changed,section_cmp) -LDFLAGS_vmlinux := --oformat $(LD_BFD) -e startup $(if $(CONFIG_VMLINUX_MAP),-Map=$(obj)/vmlinux.map) --build-id=sha1 -T +LDFLAGS_vmlinux-$(CONFIG_LD_ORPHAN_WARN) := --orphan-handling=$(CONFIG_LD_ORPHAN_WARN_LEVEL) +LDFLAGS_vmlinux := $(LDFLAGS_vmlinux-y) --oformat $(LD_BFD) -e startup $(if $(CONFIG_VMLINUX_MAP),-Map=$(obj)/vmlinux.map) --build-id=sha1 -T $(obj)/vmlinux: $(obj)/vmlinux.lds $(OBJECTS_ALL) FORCE $(call if_changed,ld) -LDFLAGS_vmlinux.syms := --oformat $(LD_BFD) -e startup -T +LDFLAGS_vmlinux.syms := $(LDFLAGS_vmlinux-y) --oformat $(LD_BFD) -e startup -T $(obj)/vmlinux.syms: $(obj)/vmlinux.lds $(OBJECTS) FORCE $(call if_changed,ld) |