All of lore.kernel.org
 help / color / mirror / Atom feed
* 83a092cf95f28: powerpc: Link warning for orphan sections
@ 2018-07-03  7:03 Mathieu Malaterre
  2018-07-03  7:23 ` Nicholas Piggin
  0 siblings, 1 reply; 3+ messages in thread
From: Mathieu Malaterre @ 2018-07-03  7:03 UTC (permalink / raw)
  To: Nicholas Piggin; +Cc: linuxppc-dev

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.

Thanks

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: 83a092cf95f28: powerpc: Link warning for orphan sections
  2018-07-03  7:03 83a092cf95f28: powerpc: Link warning for orphan sections Mathieu Malaterre
@ 2018-07-03  7:23 ` Nicholas Piggin
  2018-07-03  7:37   ` Mathieu Malaterre
  0 siblings, 1 reply; 3+ messages in thread
From: Nicholas Piggin @ 2018-07-03  7:23 UTC (permalink / raw)
  To: Mathieu Malaterre; +Cc: linuxppc-dev

On Tue, 3 Jul 2018 09:03:46 +0200
Mathieu Malaterre <malat@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

Thanks,
Nick

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: 83a092cf95f28: powerpc: Link warning for orphan sections
  2018-07-03  7:23 ` Nicholas Piggin
@ 2018-07-03  7:37   ` Mathieu Malaterre
  0 siblings, 0 replies; 3+ messages in thread
From: Mathieu Malaterre @ 2018-07-03  7:37 UTC (permalink / raw)
  To: Nicholas Piggin; +Cc: linuxppc-dev

On Tue, Jul 3, 2018 at 9:23 AM Nicholas Piggin <npiggin@gmail.com> wrote:
>
> On Tue, 3 Jul 2018 09:03:46 +0200
> Mathieu Malaterre <malat@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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-07-03  7:37 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-03  7:03 83a092cf95f28: powerpc: Link warning for orphan sections Mathieu Malaterre
2018-07-03  7:23 ` Nicholas Piggin
2018-07-03  7:37   ` Mathieu Malaterre

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.