Commit ba6c26af authored by Nathan Chancellor's avatar Nathan Chancellor Committed by Heiko Carstens

s390/boot: vmlinux.lds.S: handle DWARF debug sections

When building with CONFIG_LD_ORPHAN_WARN after selecting
CONFIG_ARCH_HAS_LD_ORPHAN_WARN, there are several series of warnings for
each file in arch/s390/boot due to the boot linker script not handling
the DWARF debug sections:

  s390-linux-ld: warning: orphan section `.debug_line' from `arch/s390/boot/head.o' being placed in section `.debug_line'
  s390-linux-ld: warning: orphan section `.debug_info' from `arch/s390/boot/head.o' being placed in section `.debug_info'
  s390-linux-ld: warning: orphan section `.debug_abbrev' from `arch/s390/boot/head.o' being placed in section `.debug_abbrev'
  s390-linux-ld: warning: orphan section `.debug_aranges' from `arch/s390/boot/head.o' being placed in section `.debug_aranges'
  s390-linux-ld: warning: orphan section `.debug_str' from `arch/s390/boot/head.o' being placed in section `.debug_str'

include/asm-generic/vmlinux.lds.h has a macro for DWARF debug sections
named DWARF_DEBUG, use it to clear up the warnings.
Signed-off-by: default avatarNathan Chancellor <nathan@kernel.org>
Tested-by: default avatarJustin Stitt <justinstitt@google.com>
Reviewed-by: default avatarFangrui Song <maskray@google.com>
Link: https://lore.kernel.org/r/20240207-s390-lld-and-orphan-warn-v1-7-8a665b3346ab@kernel.orgSigned-off-by: default avatarHeiko Carstens <hca@linux.ibm.com>
parent 64d590a2
......@@ -122,6 +122,8 @@ SECTIONS
}
_end = .;
DWARF_DEBUG
/*
* Sections that should stay zero sized, which is safer to
* explicitly check instead of blindly discarding.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment