• Mathieu Malaterre's avatar
    powerpc/32: Add .data..Lubsan_data*/.data..Lubsan_type* sections explicitly · beba24ac
    Mathieu Malaterre authored
    When both `CONFIG_LD_DEAD_CODE_DATA_ELIMINATION=y` and `CONFIG_UBSAN=y`
    are set, link step typically produce numberous warnings about orphan
    section:
    
      + powerpc-linux-gnu-ld -EB -m elf32ppc -Bstatic --orphan-handling=warn --build-id --gc-sections -X -o .tmp_vmlinux1 -T ./arch/powerpc/kernel/vmlinux.lds --who
      le-archive built-in.a --no-whole-archive --start-group lib/lib.a --end-group
      powerpc-linux-gnu-ld: warning: orphan section `.data..Lubsan_data393' from `init/main.o' being placed in section `.data..Lubsan_data393'.
      powerpc-linux-gnu-ld: warning: orphan section `.data..Lubsan_data394' from `init/main.o' being placed in section `.data..Lubsan_data394'.
      ...
      powerpc-linux-gnu-ld: warning: orphan section `.data..Lubsan_type11' from `init/main.o' being placed in section `.data..Lubsan_type11'.
      powerpc-linux-gnu-ld: warning: orphan section `.data..Lubsan_type12' from `init/main.o' being placed in section `.data..Lubsan_type12'.
      ...
    
    This commit remove those warnings produced at W=1.
    
    Link: https://www.mail-archive.com/linuxppc-dev@lists.ozlabs.org/msg135407.htmlSuggested-by: default avatarNicholas Piggin <npiggin@gmail.com>
    Signed-off-by: default avatarMathieu Malaterre <malat@debian.org>
    Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
    beba24ac
vmlinux.lds.S 8.68 KB