On Tue, Jul 3, 2018 at 9:23 AM Nicholas Piggin <npig...@gmail.com> wrote: > > On Tue, 3 Jul 2018 09:03:46 +0200 > Mathieu Malaterre <ma...@debian.org> wrote: > > > Hi Nick, > > > > I am building my kernel (ppc32) with both > > CONFIG_LD_DEAD_CODE_DATA_ELIMINATION=y and CONFIG_UBSAN=y. This leads > > to ~316428 warnings such as: > > > > + 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_data395' > > from `init/main.o' being placed in section `.data..Lubsan_data395'. > > powerpc-linux-gnu-ld: warning: orphan section `.data..Lubsan_data396' > > from `init/main.o' being placed in section `.data..Lubsan_data396'. > > ... > > > > What would you recommend to reduce the number of warnings produced ? I > > tried `--warn-once` but that only affect undefined symbols. > > I'm not sure if the linker can be quietened. You could try putting > *(.data..Lubsan_data*) into the .data section in > powerpc/kernel/vmlinux.lds.S
Nice ! Will submit a patch. Thanks > Thanks, > Nick