lkml.org 
[lkml]   [2024]   [Feb]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Date
    Subject[PATCH 07/11] 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: Nathan Chancellor <nathan@kernel.org>
    ---
    arch/s390/boot/vmlinux.lds.S | 2 ++
    1 file changed, 2 insertions(+)

    diff --git a/arch/s390/boot/vmlinux.lds.S b/arch/s390/boot/vmlinux.lds.S
    index ff8c62d84f98..83af17bfe630 100644
    --- a/arch/s390/boot/vmlinux.lds.S
    +++ b/arch/s390/boot/vmlinux.lds.S
    @@ -122,6 +122,8 @@ SECTIONS
    }
    _end = .;

    + DWARF_DEBUG
    +
    /*
    * Sections that should stay zero sized, which is safer to
    * explicitly check instead of blindly discarding.
    --
    2.43.0


    \
     
     \ /
      Last update: 2024-05-27 14:54    [W:7.556 / U:0.024 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site