2018-08-24 03:33:30

by Stephen Rothwell

[permalink] [raw]
Subject: linux-next: build warnings from the build of Linus' tree

Hi all,

After merging the origin tree, today's linux-next build (powerpc
allyesconfig) produced these warnings:

ld: warning: orphan section `.data..LPBX1' from `kernel/trace/trace_selftest_dynamic.o' being placed in section `.data..LPBX1'
ld: warning: orphan section `.data..LPBX1' from `kernel/trace/trace_kprobe_selftest.o' being placed in section `.data..LPBX1'
ld: warning: orphan section `.data..LPBX1' from `kernel/trace/trace_clock.o' being placed in section `.data..LPBX1'
ld: warning: orphan section `.data..LPBX1' from `kernel/trace/ftrace.o' being placed in section `.data..LPBX1'
ld: warning: orphan section `.data..LPBX1' from `kernel/trace/ring_buffer.o' being placed in section `.data..LPBX1'
ld: warning: orphan section `.data..LPBX1' from `kernel/trace/ring_buffer_benchmark.o' being placed in section `.data..LPBX1'
ld: warning: orphan section `.data..LPBX1' from `kernel/trace/trace.o' being placed in section `.data..LPBX1'
ld: warning: orphan section `.data..LPBX1' from `kernel/trace/trace_output.o' being placed in section `.data..LPBX1'
ld: warning: orphan section `.data..LPBX1' from `kernel/trace/trace_seq.o' being placed in section `.data..LPBX1'
ld: warning: orphan section `.data..LPBX1' from `kernel/trace/trace_stat.o' being placed in section `.data..LPBX1'
ld: warning: orphan section `.data..LPBX1' from `kernel/trace/trace_printk.o' being placed in section `.data..LPBX1'
ld: warning: orphan section `.data..LPBX1' from `kernel/trace/tracing_map.o' being placed in section `.data..LPBX1'
ld: warning: orphan section `.data..LPBX1' from `kernel/trace/trace_sched_switch.o' being placed in section `.data..LPBX1'
ld: warning: orphan section `.data..LPBX1' from `kernel/trace/trace_functions.o' being placed in section `.data..LPBX1'
ld: warning: orphan section `.data..LPBX1' from `kernel/trace/trace_preemptirq.o' being placed in section `.data..LPBX1'
ld: warning: orphan section `.data..LPBX1' from `kernel/trace/trace_irqsoff.o' being placed in section `.data..LPBX1'
ld: warning: orphan section `.data..LPBX1' from `kernel/trace/trace_sched_wakeup.o' being placed in section `.data..LPBX1'
ld: warning: orphan section `.data..LPBX1' from `kernel/trace/trace_hwlat.o' being placed in section `.data..LPBX1'
ld: warning: orphan section `.data..LPBX1' from `kernel/trace/trace_nop.o' being placed in section `.data..LPBX1'
ld: warning: orphan section `.data..LPBX1' from `kernel/trace/trace_stack.o' being placed in section `.data..LPBX1'
ld: warning: orphan section `.data..LPBX1' from `kernel/trace/trace_functions_graph.o' being placed in section `.data..LPBX1'
ld: warning: orphan section `.data..LPBX1' from `kernel/trace/blktrace.o' being placed in section `.data..LPBX1'
ld: warning: orphan section `.data..LPBX1' from `kernel/trace/trace_events.o' being placed in section `.data..LPBX1'
ld: warning: orphan section `.data..LPBX1' from `kernel/trace/trace_export.o' being placed in section `.data..LPBX1'
ld: warning: orphan section `.data..LPBX1' from `kernel/trace/trace_syscalls.o' being placed in section `.data..LPBX1'
ld: warning: orphan section `.data..LPBX1' from `kernel/trace/trace_event_perf.o' being placed in section `.data..LPBX1'
ld: warning: orphan section `.data..LPBX1' from `kernel/trace/trace_events_filter.o' being placed in section `.data..LPBX1'
ld: warning: orphan section `.data..LPBX1' from `kernel/trace/trace_events_trigger.o' being placed in section `.data..LPBX1'
ld: warning: orphan section `.data..LPBX1' from `kernel/trace/trace_events_hist.o' being placed in section `.data..LPBX1'
ld: warning: orphan section `.data..LPBX1' from `kernel/trace/bpf_trace.o' being placed in section `.data..LPBX1'
ld: warning: orphan section `.data..LPBX1' from `kernel/trace/trace_kprobe.o' being placed in section `.data..LPBX1'
ld: warning: orphan section `.data..LPBX1' from `kernel/trace/power-traces.o' being placed in section `.data..LPBX1'
ld: warning: orphan section `.data..LPBX1' from `kernel/trace/rpm-traces.o' being placed in section `.data..LPBX1'
ld: warning: orphan section `.data..LPBX1' from `kernel/trace/trace_kdb.o' being placed in section `.data..LPBX1'
ld: warning: orphan section `.data..LPBX1' from `kernel/trace/trace_probe.o' being placed in section `.data..LPBX1'
ld: warning: orphan section `.data..LPBX1' from `kernel/trace/trace_uprobe.o' being placed in section `.data..LPBX1'
ld: warning: orphan section `.data..LPBX1' from `kernel/trace/trace_benchmark.o' being placed in section `.data..LPBX1'

Maybe introduced by commit

6b7dca401cb1 ("tracing: Allow gcov profiling on only ftrace subsystem")

I am guessing, but that is the only new thing that affects all of
kernel/trace ...

--
Cheers,
Stephen Rothwell


Attachments:
(No filename) (499.00 B)
OpenPGP digital signature

2018-08-24 08:22:40

by Masami Hiramatsu

[permalink] [raw]
Subject: Re: linux-next: build warnings from the build of Linus' tree

On Fri, 24 Aug 2018 13:32:06 +1000
Stephen Rothwell <[email protected]> wrote:

> Hi all,
>
> After merging the origin tree, today's linux-next build (powerpc
> allyesconfig) produced these warnings:
>
> ld: warning: orphan section `.data..LPBX1' from `kernel/trace/trace_selftest_dynamic.o' being placed in section `.data..LPBX1'
> ld: warning: orphan section `.data..LPBX1' from `kernel/trace/trace_kprobe_selftest.o' being placed in section `.data..LPBX1'
> ld: warning: orphan section `.data..LPBX1' from `kernel/trace/trace_clock.o' being placed in section `.data..LPBX1'
> ld: warning: orphan section `.data..LPBX1' from `kernel/trace/ftrace.o' being placed in section `.data..LPBX1'
> ld: warning: orphan section `.data..LPBX1' from `kernel/trace/ring_buffer.o' being placed in section `.data..LPBX1'
> ld: warning: orphan section `.data..LPBX1' from `kernel/trace/ring_buffer_benchmark.o' being placed in section `.data..LPBX1'
> ld: warning: orphan section `.data..LPBX1' from `kernel/trace/trace.o' being placed in section `.data..LPBX1'
> ld: warning: orphan section `.data..LPBX1' from `kernel/trace/trace_output.o' being placed in section `.data..LPBX1'
> ld: warning: orphan section `.data..LPBX1' from `kernel/trace/trace_seq.o' being placed in section `.data..LPBX1'
> ld: warning: orphan section `.data..LPBX1' from `kernel/trace/trace_stat.o' being placed in section `.data..LPBX1'
> ld: warning: orphan section `.data..LPBX1' from `kernel/trace/trace_printk.o' being placed in section `.data..LPBX1'
> ld: warning: orphan section `.data..LPBX1' from `kernel/trace/tracing_map.o' being placed in section `.data..LPBX1'
> ld: warning: orphan section `.data..LPBX1' from `kernel/trace/trace_sched_switch.o' being placed in section `.data..LPBX1'
> ld: warning: orphan section `.data..LPBX1' from `kernel/trace/trace_functions.o' being placed in section `.data..LPBX1'
> ld: warning: orphan section `.data..LPBX1' from `kernel/trace/trace_preemptirq.o' being placed in section `.data..LPBX1'
> ld: warning: orphan section `.data..LPBX1' from `kernel/trace/trace_irqsoff.o' being placed in section `.data..LPBX1'
> ld: warning: orphan section `.data..LPBX1' from `kernel/trace/trace_sched_wakeup.o' being placed in section `.data..LPBX1'
> ld: warning: orphan section `.data..LPBX1' from `kernel/trace/trace_hwlat.o' being placed in section `.data..LPBX1'
> ld: warning: orphan section `.data..LPBX1' from `kernel/trace/trace_nop.o' being placed in section `.data..LPBX1'
> ld: warning: orphan section `.data..LPBX1' from `kernel/trace/trace_stack.o' being placed in section `.data..LPBX1'
> ld: warning: orphan section `.data..LPBX1' from `kernel/trace/trace_functions_graph.o' being placed in section `.data..LPBX1'
> ld: warning: orphan section `.data..LPBX1' from `kernel/trace/blktrace.o' being placed in section `.data..LPBX1'
> ld: warning: orphan section `.data..LPBX1' from `kernel/trace/trace_events.o' being placed in section `.data..LPBX1'
> ld: warning: orphan section `.data..LPBX1' from `kernel/trace/trace_export.o' being placed in section `.data..LPBX1'
> ld: warning: orphan section `.data..LPBX1' from `kernel/trace/trace_syscalls.o' being placed in section `.data..LPBX1'
> ld: warning: orphan section `.data..LPBX1' from `kernel/trace/trace_event_perf.o' being placed in section `.data..LPBX1'
> ld: warning: orphan section `.data..LPBX1' from `kernel/trace/trace_events_filter.o' being placed in section `.data..LPBX1'
> ld: warning: orphan section `.data..LPBX1' from `kernel/trace/trace_events_trigger.o' being placed in section `.data..LPBX1'
> ld: warning: orphan section `.data..LPBX1' from `kernel/trace/trace_events_hist.o' being placed in section `.data..LPBX1'
> ld: warning: orphan section `.data..LPBX1' from `kernel/trace/bpf_trace.o' being placed in section `.data..LPBX1'
> ld: warning: orphan section `.data..LPBX1' from `kernel/trace/trace_kprobe.o' being placed in section `.data..LPBX1'
> ld: warning: orphan section `.data..LPBX1' from `kernel/trace/power-traces.o' being placed in section `.data..LPBX1'
> ld: warning: orphan section `.data..LPBX1' from `kernel/trace/rpm-traces.o' being placed in section `.data..LPBX1'
> ld: warning: orphan section `.data..LPBX1' from `kernel/trace/trace_kdb.o' being placed in section `.data..LPBX1'
> ld: warning: orphan section `.data..LPBX1' from `kernel/trace/trace_probe.o' being placed in section `.data..LPBX1'
> ld: warning: orphan section `.data..LPBX1' from `kernel/trace/trace_uprobe.o' being placed in section `.data..LPBX1'
> ld: warning: orphan section `.data..LPBX1' from `kernel/trace/trace_benchmark.o' being placed in section `.data..LPBX1'
>
> Maybe introduced by commit
>
> 6b7dca401cb1 ("tracing: Allow gcov profiling on only ftrace subsystem")
>
> I am guessing, but that is the only new thing that affects all of
> kernel/trace ...

Yes, I agree. But I just followed Documentation/dev-tools/gcov.rst
to enable profiling in kernel/trace. Hmm, doesn't ppc64 support
GCOV_PROFILE? (But as far as I can see, ARCH_HAS_GCOV_PROFILE_ALL
is enabled in arch/powerpc/Kconfig)

Anyway, I'll try to reproduce it.

Thanks,

--
Masami Hiramatsu <[email protected]>

2018-08-24 11:49:21

by Masami Hiramatsu

[permalink] [raw]
Subject: Re: linux-next: build warnings from the build of Linus' tree

On Fri, 24 Aug 2018 17:20:53 +0900
Masami Hiramatsu <[email protected]> wrote:

> On Fri, 24 Aug 2018 13:32:06 +1000
> Stephen Rothwell <[email protected]> wrote:
>
> > Hi all,
> >
> > After merging the origin tree, today's linux-next build (powerpc
> > allyesconfig) produced these warnings:
> >
> > ld: warning: orphan section `.data..LPBX1' from `kernel/trace/trace_selftest_dynamic.o' being placed in section `.data..LPBX1'
> > ld: warning: orphan section `.data..LPBX1' from `kernel/trace/trace_kprobe_selftest.o' being placed in section `.data..LPBX1'
> > ld: warning: orphan section `.data..LPBX1' from `kernel/trace/trace_clock.o' being placed in section `.data..LPBX1'
> > ld: warning: orphan section `.data..LPBX1' from `kernel/trace/ftrace.o' being placed in section `.data..LPBX1'
> > ld: warning: orphan section `.data..LPBX1' from `kernel/trace/ring_buffer.o' being placed in section `.data..LPBX1'
> > ld: warning: orphan section `.data..LPBX1' from `kernel/trace/ring_buffer_benchmark.o' being placed in section `.data..LPBX1'
> > ld: warning: orphan section `.data..LPBX1' from `kernel/trace/trace.o' being placed in section `.data..LPBX1'
> > ld: warning: orphan section `.data..LPBX1' from `kernel/trace/trace_output.o' being placed in section `.data..LPBX1'
> > ld: warning: orphan section `.data..LPBX1' from `kernel/trace/trace_seq.o' being placed in section `.data..LPBX1'
> > ld: warning: orphan section `.data..LPBX1' from `kernel/trace/trace_stat.o' being placed in section `.data..LPBX1'
> > ld: warning: orphan section `.data..LPBX1' from `kernel/trace/trace_printk.o' being placed in section `.data..LPBX1'
> > ld: warning: orphan section `.data..LPBX1' from `kernel/trace/tracing_map.o' being placed in section `.data..LPBX1'
> > ld: warning: orphan section `.data..LPBX1' from `kernel/trace/trace_sched_switch.o' being placed in section `.data..LPBX1'
> > ld: warning: orphan section `.data..LPBX1' from `kernel/trace/trace_functions.o' being placed in section `.data..LPBX1'
> > ld: warning: orphan section `.data..LPBX1' from `kernel/trace/trace_preemptirq.o' being placed in section `.data..LPBX1'
> > ld: warning: orphan section `.data..LPBX1' from `kernel/trace/trace_irqsoff.o' being placed in section `.data..LPBX1'
> > ld: warning: orphan section `.data..LPBX1' from `kernel/trace/trace_sched_wakeup.o' being placed in section `.data..LPBX1'
> > ld: warning: orphan section `.data..LPBX1' from `kernel/trace/trace_hwlat.o' being placed in section `.data..LPBX1'
> > ld: warning: orphan section `.data..LPBX1' from `kernel/trace/trace_nop.o' being placed in section `.data..LPBX1'
> > ld: warning: orphan section `.data..LPBX1' from `kernel/trace/trace_stack.o' being placed in section `.data..LPBX1'
> > ld: warning: orphan section `.data..LPBX1' from `kernel/trace/trace_functions_graph.o' being placed in section `.data..LPBX1'
> > ld: warning: orphan section `.data..LPBX1' from `kernel/trace/blktrace.o' being placed in section `.data..LPBX1'
> > ld: warning: orphan section `.data..LPBX1' from `kernel/trace/trace_events.o' being placed in section `.data..LPBX1'
> > ld: warning: orphan section `.data..LPBX1' from `kernel/trace/trace_export.o' being placed in section `.data..LPBX1'
> > ld: warning: orphan section `.data..LPBX1' from `kernel/trace/trace_syscalls.o' being placed in section `.data..LPBX1'
> > ld: warning: orphan section `.data..LPBX1' from `kernel/trace/trace_event_perf.o' being placed in section `.data..LPBX1'
> > ld: warning: orphan section `.data..LPBX1' from `kernel/trace/trace_events_filter.o' being placed in section `.data..LPBX1'
> > ld: warning: orphan section `.data..LPBX1' from `kernel/trace/trace_events_trigger.o' being placed in section `.data..LPBX1'
> > ld: warning: orphan section `.data..LPBX1' from `kernel/trace/trace_events_hist.o' being placed in section `.data..LPBX1'
> > ld: warning: orphan section `.data..LPBX1' from `kernel/trace/bpf_trace.o' being placed in section `.data..LPBX1'
> > ld: warning: orphan section `.data..LPBX1' from `kernel/trace/trace_kprobe.o' being placed in section `.data..LPBX1'
> > ld: warning: orphan section `.data..LPBX1' from `kernel/trace/power-traces.o' being placed in section `.data..LPBX1'
> > ld: warning: orphan section `.data..LPBX1' from `kernel/trace/rpm-traces.o' being placed in section `.data..LPBX1'
> > ld: warning: orphan section `.data..LPBX1' from `kernel/trace/trace_kdb.o' being placed in section `.data..LPBX1'
> > ld: warning: orphan section `.data..LPBX1' from `kernel/trace/trace_probe.o' being placed in section `.data..LPBX1'
> > ld: warning: orphan section `.data..LPBX1' from `kernel/trace/trace_uprobe.o' being placed in section `.data..LPBX1'
> > ld: warning: orphan section `.data..LPBX1' from `kernel/trace/trace_benchmark.o' being placed in section `.data..LPBX1'
> >
> > Maybe introduced by commit
> >
> > 6b7dca401cb1 ("tracing: Allow gcov profiling on only ftrace subsystem")
> >
> > I am guessing, but that is the only new thing that affects all of
> > kernel/trace ...
>
> Yes, I agree. But I just followed Documentation/dev-tools/gcov.rst
> to enable profiling in kernel/trace. Hmm, doesn't ppc64 support
> GCOV_PROFILE? (But as far as I can see, ARCH_HAS_GCOV_PROFILE_ALL
> is enabled in arch/powerpc/Kconfig)
>
> Anyway, I'll try to reproduce it.

gcc-7.3.0 cross build ld shows below warnings.

MODPOST vmlinux.o
/opt/gcc-7.3.0-nolibc/powerpc64-linux/bin/powerpc64-linux-ld: warning: orphan section `.gnu.hash' from `linker stubs' being placed in section `.gnu.hash'.
KSYM .tmp_kallsyms1.o
/opt/gcc-7.3.0-nolibc/powerpc64-linux/bin/powerpc64-linux-ld: warning: orphan section `.gnu.hash' from `linker stubs' being placed in section `.gnu.hash'.
KSYM .tmp_kallsyms2.o
/opt/gcc-7.3.0-nolibc/powerpc64-linux/bin/powerpc64-linux-ld: warning: orphan section `.gnu.hash' from `linker stubs' being placed in section `.gnu.hash'.
KSYM .tmp_kallsyms3.o
LD vmlinux
/opt/gcc-7.3.0-nolibc/powerpc64-linux/bin/powerpc64-linux-ld: warning: orphan section `.gnu.hash' from `linker stubs' being placed in section `.gnu.hash'.

But it seems another warning, and I couldn't see your warnings. Could you tell me your gcc version?

Thank you,

--
Masami Hiramatsu <[email protected]>

2018-08-24 12:44:34

by Stephen Rothwell

[permalink] [raw]
Subject: Re: linux-next: build warnings from the build of Linus' tree

Hi Masami,

On Fri, 24 Aug 2018 20:47:56 +0900 Masami Hiramatsu <[email protected]> wrote:
>
> gcc-7.3.0 cross build ld shows below warnings.
>
> MODPOST vmlinux.o
> /opt/gcc-7.3.0-nolibc/powerpc64-linux/bin/powerpc64-linux-ld: warning: orphan section `.gnu.hash' from `linker stubs' being placed in section `.gnu.hash'.
> KSYM .tmp_kallsyms1.o
> /opt/gcc-7.3.0-nolibc/powerpc64-linux/bin/powerpc64-linux-ld: warning: orphan section `.gnu.hash' from `linker stubs' being placed in section `.gnu.hash'.
> KSYM .tmp_kallsyms2.o
> /opt/gcc-7.3.0-nolibc/powerpc64-linux/bin/powerpc64-linux-ld: warning: orphan section `.gnu.hash' from `linker stubs' being placed in section `.gnu.hash'.
> KSYM .tmp_kallsyms3.o
> LD vmlinux
> /opt/gcc-7.3.0-nolibc/powerpc64-linux/bin/powerpc64-linux-ld: warning: orphan section `.gnu.hash' from `linker stubs' being placed in section `.gnu.hash'.

I reported those a while ago when I started using the native Debian gcc
on my Powerpc build box.

> But it seems another warning, and I couldn't see your warnings. Could you tell me your gcc version?

Currently, it is the Debian gcc 8.2.0, ld 2.31.1.

--
Cheers,
Stephen Rothwell


Attachments:
(No filename) (499.00 B)
OpenPGP digital signature

2018-08-24 12:47:57

by Arnd Bergmann

[permalink] [raw]
Subject: Re: linux-next: build warnings from the build of Linus' tree

On Fri, Aug 24, 2018 at 10:23 AM Masami Hiramatsu <[email protected]> wrote:
>
> On Fri, 24 Aug 2018 13:32:06 +1000
> Stephen Rothwell <[email protected]> wrote:
>
> > Hi all,
> >
> > After merging the origin tree, today's linux-next build (powerpc
> > allyesconfig) produced these warnings:
> >
> > Maybe introduced by commit
> >
> > 6b7dca401cb1 ("tracing: Allow gcov profiling on only ftrace subsystem")
> >
> > I am guessing, but that is the only new thing that affects all of
> > kernel/trace ...
>
> Yes, I agree. But I just followed Documentation/dev-tools/gcov.rst
> to enable profiling in kernel/trace. Hmm, doesn't ppc64 support
> GCOV_PROFILE? (But as far as I can see, ARCH_HAS_GCOV_PROFILE_ALL
> is enabled in arch/powerpc/Kconfig)
>
> Anyway, I'll try to reproduce it.

Thje same commit causes a link failure on ARM with a randconfig
kernel (see https://pastebin.com/KspjpyKG for the .config):

`.text.exit' referenced in section `.ARM.exidx.text.exit' of
kernel/trace/trace_clock.o: defined in discarded section `.text.exit'
of kernel/trace/trace_clock.o
`_GLOBAL__sub_D_00100_1_trace_clock_local' referenced in section
`.fini_array.00100' of kernel/trace/trace_clock.o: defined in
discarded section `.text.exit' of kernel/trace/trace_clock.o
`.text.exit' referenced in section `.ARM.exidx.text.exit' of
kernel/trace/ftrace.o: defined in discarded section `.text.exit' of
kernel/trace/ftrace.o
`_GLOBAL__sub_D_00100_1_function_trace_op' referenced in section
`.fini_array.00100' of kernel/trace/ftrace.o: defined in discarded
section `.text.exit' of kernel/trace/ftrace.o
`.text.exit' referenced in section `.ARM.exidx.text.exit' of
kernel/trace/ring_buffer.o: defined in discarded section `.text.exit'
of kernel/trace/ring_buffer.o
`_GLOBAL__sub_D_00100_1_ring_buffer_print_entry_header' referenced in
section `.fini_array.00100' of kernel/trace/ring_buffer.o: defined in
discarded section `.text.exit' of kernel/trace/ring_buffer.o
`.text.exit' referenced in section `.ARM.exidx.text.exit' of
kernel/trace/ring_buffer_benchmark.o: defined in discarded section
`.text.exit' of kernel/trace/ring_buffer_benchmark.o
`_GLOBAL__sub_D_00100_1_ring_buffer_benchmark.c' referenced in section
`.fini_array.00100' of kernel/trace/ring_buffer_benchmark.o: defined
in discarded section `.text.exit' of
kernel/trace/ring_buffer_benchmark.o
`.text.exit' referenced in section `.ARM.exidx.text.exit' of
kernel/trace/trace.o: defined in discarded section `.text.exit' of
kernel/trace/trace.o
`_GLOBAL__sub_D_00100_1_ns2usecs' referenced in section
`.fini_array.00100' of kernel/trace/trace.o: defined in discarded
section `.text.exit' of kernel/trace/trace.o
`.text.exit' referenced in section `.ARM.exidx.text.exit' of
kernel/trace/trace_output.o: defined in discarded section `.text.exit'
of kernel/trace/trace_output.o
`_GLOBAL__sub_D_00100_1_trace_event_sem' referenced in section
`.fini_array.00100' of kernel/trace/trace_output.o: defined in
discarded section `.text.exit' of kernel/trace/trace_output.o
`.text.exit' referenced in section `.ARM.exidx.text.exit' of
kernel/trace/trace_seq.o: defined in discarded section `.text.exit' of
kernel/trace/trace_seq.o
`_GLOBAL__sub_D_00100_1_trace_print_seq' referenced in section
`.fini_array.00100' of kernel/trace/trace_seq.o: defined in discarded
section `.text.exit' of kernel/trace/trace_seq.o
`.text.exit' referenced in section `.ARM.exidx.text.exit' of
kernel/trace/trace_stat.o: defined in discarded section `.text.exit'
of kernel/trace/trace_stat.o
`_GLOBAL__sub_D_00100_1_register_stat_tracer' referenced in section
`.fini_array.00100' of kernel/trace/trace_stat.o: defined in discarded
section `.text.exit' of kernel/trace/trace_stat.o
`.text.exit' referenced in section `.ARM.exidx.text.exit' of
kernel/trace/trace_printk.o: defined in discarded section `.text.exit'
of kernel/trace/trace_printk.o
`_GLOBAL__sub_D_00100_1_trace_printk_control' referenced in section
`.fini_array.00100' of kernel/trace/trace_printk.o: defined in
discarded section `.text.exit' of kernel/trace/trace_printk.o
`.text.exit' referenced in section `.ARM.exidx.text.exit' of
kernel/trace/trace_sched_switch.o: defined in discarded section
`.text.exit' of kernel/trace/trace_sched_switch.o
`_GLOBAL__sub_D_00100_1_tracing_start_cmdline_record' referenced in
section `.fini_array.00100' of kernel/trace/trace_sched_switch.o:
defined in discarded section `.text.exit' of
kernel/trace/trace_sched_switch.o
`.text.exit' referenced in section `.ARM.exidx.text.exit' of
kernel/trace/trace_functions.o: defined in discarded section
`.text.exit' of kernel/trace/trace_functions.o
`_GLOBAL__sub_D_00100_1_ftrace_create_function_files' referenced in
section `.fini_array.00100' of kernel/trace/trace_functions.o: defined
in discarded section `.text.exit' of kernel/trace/trace_functions.o
`.text.exit' referenced in section `.ARM.exidx.text.exit' of
kernel/trace/trace_preemptirq.o: defined in discarded section
`.text.exit' of kernel/trace/trace_preemptirq.o
`_GLOBAL__sub_D_00100_1___tracepoint_irq_disable' referenced in
section `.fini_array.00100' of kernel/trace/trace_preemptirq.o:
defined in discarded section `.text.exit' of
kernel/trace/trace_preemptirq.o
`.text.exit' referenced in section `.ARM.exidx.text.exit' of
kernel/trace/trace_irqsoff.o: defined in discarded section
`.text.exit' of kernel/trace/trace_irqsoff.o
`_GLOBAL__sub_D_00100_1_start_critical_timings' referenced in section
`.fini_array.00100' of kernel/trace/trace_irqsoff.o: defined in
discarded section `.text.exit' of kernel/trace/trace_irqsoff.o
`.text.exit' referenced in section `.ARM.exidx.text.exit' of
kernel/trace/trace_sched_wakeup.o: defined in discarded section
`.text.exit' of kernel/trace/trace_sched_wakeup.o
`_GLOBAL__sub_D_00100_1_trace_sched_wakeup.c' referenced in section
`.fini_array.00100' of kernel/trace/trace_sched_wakeup.o: defined in
discarded section `.text.exit' of kernel/trace/trace_sched_wakeup.o
`.text.exit' referenced in section `.ARM.exidx.text.exit' of
kernel/trace/trace_hwlat.o: defined in discarded section `.text.exit'
of kernel/trace/trace_hwlat.o
`_GLOBAL__sub_D_00100_1_trace_hwlat_callback' referenced in section
`.fini_array.00100' of kernel/trace/trace_hwlat.o: defined in
discarded section `.text.exit' of kernel/trace/trace_hwlat.o
`.text.exit' referenced in section `.ARM.exidx.text.exit' of
kernel/trace/trace_nop.o: defined in discarded section `.text.exit' of
kernel/trace/trace_nop.o
`_GLOBAL__sub_D_00100_1_nop_trace' referenced in section
`.fini_array.00100' of kernel/trace/trace_nop.o: defined in discarded
section `.text.exit' of kernel/trace/trace_nop.o
`.text.exit' referenced in section `.ARM.exidx.text.exit' of
kernel/trace/trace_stack.o: defined in discarded section `.text.exit'
of kernel/trace/trace_stack.o
`_GLOBAL__sub_D_00100_1_stack_trace_max' referenced in section
`.fini_array.00100' of kernel/trace/trace_stack.o: defined in
discarded section `.text.exit' of kernel/trace/trace_stack.o
`.text.exit' referenced in section `.ARM.exidx.text.exit' of
kernel/trace/trace_branch.o: defined in discarded section `.text.exit'
of kernel/trace/trace_branch.o
`_GLOBAL__sub_D_00100_1_enable_branch_tracing' referenced in section
`.fini_array.00100' of kernel/trace/trace_branch.o: defined in
discarded section `.text.exit' of kernel/trace/trace_branch.o
`.text.exit' referenced in section `.ARM.exidx.text.exit' of
kernel/trace/trace_events.o: defined in discarded section `.text.exit'
of kernel/trace/trace_events.o
`_GLOBAL__sub_D_00100_1_event_mutex' referenced in section
`.fini_array.00100' of kernel/trace/trace_events.o: defined in
discarded section `.text.exit' of kernel/trace/trace_events.o
`.text.exit' referenced in section `.ARM.exidx.text.exit' of
kernel/trace/trace_export.o: defined in discarded section `.text.exit'
of kernel/trace/trace_export.o
`_GLOBAL__sub_D_00100_1_ftrace_event_is_function' referenced in
section `.fini_array.00100' of kernel/trace/trace_export.o: defined in
discarded section `.text.exit' of kernel/trace/trace_export.o
`.text.exit' referenced in section `.ARM.exidx.text.exit' of
kernel/trace/trace_event_perf.o: defined in discarded section
`.text.exit' of kernel/trace/trace_event_perf.o
`_GLOBAL__sub_D_00100_1_perf_trace_init' referenced in section
`.fini_array.00100' of kernel/trace/trace_event_perf.o: defined in
discarded section `.text.exit' of kernel/trace/trace_event_perf.o
`.text.exit' referenced in section `.ARM.exidx.text.exit' of
kernel/trace/trace_events_filter.o: defined in discarded section
`.text.exit' of kernel/trace/trace_events_filter.o
`_GLOBAL__sub_D_00100_1_filter_parse_regex' referenced in section
`.fini_array.00100' of kernel/trace/trace_events_filter.o: defined in
discarded section `.text.exit' of kernel/trace/trace_events_filter.o
`.text.exit' referenced in section `.ARM.exidx.text.exit' of
kernel/trace/trace_events_trigger.o: defined in discarded section
`.text.exit' of kernel/trace/trace_events_trigger.o
`_GLOBAL__sub_D_00100_1_trigger_data_free' referenced in section
`.fini_array.00100' of kernel/trace/trace_events_trigger.o: defined in
discarded section `.text.exit' of kernel/trace/trace_events_trigger.o
`.text.exit' referenced in section `.ARM.exidx.text.exit' of
kernel/trace/power-traces.o: defined in discarded section `.text.exit'
of kernel/trace/power-traces.o
`_GLOBAL__sub_D_00100_1___tracepoint_cpu_idle' referenced in section
`.fini_array.00100' of kernel/trace/power-traces.o: defined in
discarded section `.text.exit' of kernel/trace/power-traces.o
`.text.exit' referenced in section `.ARM.exidx.text.exit' of
kernel/trace/rpm-traces.o: defined in discarded section `.text.exit'
of kernel/trace/rpm-traces.o
`_GLOBAL__sub_D_00100_1___tracepoint_rpm_suspend' referenced in
section `.fini_array.00100' of kernel/trace/rpm-traces.o: defined in
discarded section `.text.exit' of kernel/trace/rpm-traces.o
`.text.exit' referenced in section `.ARM.exidx.text.exit' of
kernel/trace/trace_benchmark.o: defined in discarded section
`.text.exit' of kernel/trace/trace_benchmark.o
`_GLOBAL__sub_D_00100_1___tracepoint_benchmark_event' referenced in
section `.fini_array.00100' of kernel/trace/trace_benchmark.o: defined
in discarded section `.text.exit' of kernel/trace/trace_benchmark.o

2018-08-25 01:53:17

by Masami Hiramatsu

[permalink] [raw]
Subject: Re: linux-next: build warnings from the build of Linus' tree

On Fri, 24 Aug 2018 22:42:11 +1000
Stephen Rothwell <[email protected]> wrote:

> Hi Masami,
>
> On Fri, 24 Aug 2018 20:47:56 +0900 Masami Hiramatsu <[email protected]> wrote:
> >
> > gcc-7.3.0 cross build ld shows below warnings.
> >
> > MODPOST vmlinux.o
> > /opt/gcc-7.3.0-nolibc/powerpc64-linux/bin/powerpc64-linux-ld: warning: orphan section `.gnu.hash' from `linker stubs' being placed in section `.gnu.hash'.
> > KSYM .tmp_kallsyms1.o
> > /opt/gcc-7.3.0-nolibc/powerpc64-linux/bin/powerpc64-linux-ld: warning: orphan section `.gnu.hash' from `linker stubs' being placed in section `.gnu.hash'.
> > KSYM .tmp_kallsyms2.o
> > /opt/gcc-7.3.0-nolibc/powerpc64-linux/bin/powerpc64-linux-ld: warning: orphan section `.gnu.hash' from `linker stubs' being placed in section `.gnu.hash'.
> > KSYM .tmp_kallsyms3.o
> > LD vmlinux
> > /opt/gcc-7.3.0-nolibc/powerpc64-linux/bin/powerpc64-linux-ld: warning: orphan section `.gnu.hash' from `linker stubs' being placed in section `.gnu.hash'.
>
> I reported those a while ago when I started using the native Debian gcc
> on my Powerpc build box.
>
> > But it seems another warning, and I couldn't see your warnings. Could you tell me your gcc version?
>
> Currently, it is the Debian gcc 8.2.0, ld 2.31.1.

Hmm, so I guess it might be related to newer gcc (8?). I need to check it on x86-64 too.

Thank you,

--
Masami Hiramatsu <[email protected]>

2018-08-25 18:55:41

by Masami Hiramatsu

[permalink] [raw]
Subject: Re: linux-next: build warnings from the build of Linus' tree

Hi Arnd,

On Fri, 24 Aug 2018 14:46:16 +0200
Arnd Bergmann <[email protected]> wrote:

> On Fri, Aug 24, 2018 at 10:23 AM Masami Hiramatsu <[email protected]> wrote:
> >
> > On Fri, 24 Aug 2018 13:32:06 +1000
> > Stephen Rothwell <[email protected]> wrote:
> >
> > > Hi all,
> > >
> > > After merging the origin tree, today's linux-next build (powerpc
> > > allyesconfig) produced these warnings:
> > >
> > > Maybe introduced by commit
> > >
> > > 6b7dca401cb1 ("tracing: Allow gcov profiling on only ftrace subsystem")
> > >
> > > I am guessing, but that is the only new thing that affects all of
> > > kernel/trace ...
> >
> > Yes, I agree. But I just followed Documentation/dev-tools/gcov.rst
> > to enable profiling in kernel/trace. Hmm, doesn't ppc64 support
> > GCOV_PROFILE? (But as far as I can see, ARCH_HAS_GCOV_PROFILE_ALL
> > is enabled in arch/powerpc/Kconfig)
> >
> > Anyway, I'll try to reproduce it.
>
> Thje same commit causes a link failure on ARM with a randconfig
> kernel (see https://pastebin.com/KspjpyKG for the .config):

OK, I confirmed that this happened with both gcc-7.3.0 and gcc-8.1.0
with your config.
I also confirmed that CONFIG_GCOV_PROFILE_ALL causes same issue.
(Note that CONFIG_GCOV_PROFILE_ALL depends on !CONFIG_COMPILE_TEST,
so allyesconfig disables it always)

Hmm, now gcov kernel itself might have a problem on arm and
powerpc(on gcc-8)?

Thanks,


--
Masami Hiramatsu <[email protected]>

2018-08-25 19:57:25

by Arnd Bergmann

[permalink] [raw]
Subject: Re: linux-next: build warnings from the build of Linus' tree

On Sat, Aug 25, 2018 at 8:53 PM Masami Hiramatsu <[email protected]> wrote:
> On Fri, 24 Aug 2018 14:46:16 +0200
> Arnd Bergmann <[email protected]> wrote:
> > On Fri, Aug 24, 2018 at 10:23 AM Masami Hiramatsu <[email protected]> wrote:
> > >
> > > On Fri, 24 Aug 2018 13:32:06 +1000
> > > Stephen Rothwell <[email protected]> wrote:
> > >
> > > > Hi all,
> > > >
> > > > After merging the origin tree, today's linux-next build (powerpc
> > > > allyesconfig) produced these warnings:
> > > >
> > > > Maybe introduced by commit
> > > >
> > > > 6b7dca401cb1 ("tracing: Allow gcov profiling on only ftrace subsystem")
> > > >
> > > > I am guessing, but that is the only new thing that affects all of
> > > > kernel/trace ...
> > >
> > > Yes, I agree. But I just followed Documentation/dev-tools/gcov.rst
> > > to enable profiling in kernel/trace. Hmm, doesn't ppc64 support
> > > GCOV_PROFILE? (But as far as I can see, ARCH_HAS_GCOV_PROFILE_ALL
> > > is enabled in arch/powerpc/Kconfig)
> > >
> > > Anyway, I'll try to reproduce it.
> >
> > Thje same commit causes a link failure on ARM with a randconfig
> > kernel (see https://pastebin.com/KspjpyKG for the .config):
>
> OK, I confirmed that this happened with both gcc-7.3.0 and gcc-8.1.0
> with your config.
> I also confirmed that CONFIG_GCOV_PROFILE_ALL causes same issue.
> (Note that CONFIG_GCOV_PROFILE_ALL depends on !CONFIG_COMPILE_TEST,
> so allyesconfig disables it always)
>
> Hmm, now gcov kernel itself might have a problem on arm and
> powerpc(on gcc-8)?

Yes, that is very possible. I always force CONFIG_COMPILE_TEST=y
in my randconfig tests, so I miss that kind of problem.

Arnd

2018-08-26 08:13:22

by Masami Hiramatsu

[permalink] [raw]
Subject: Re: linux-next: build warnings from the build of Linus' tree

Hi Stephen,

On Fri, 24 Aug 2018 22:42:11 +1000
Stephen Rothwell <[email protected]> wrote:

> Hi Masami,
>
> On Fri, 24 Aug 2018 20:47:56 +0900 Masami Hiramatsu <[email protected]> wrote:
> >
> > gcc-7.3.0 cross build ld shows below warnings.
> >
> > MODPOST vmlinux.o
> > /opt/gcc-7.3.0-nolibc/powerpc64-linux/bin/powerpc64-linux-ld: warning: orphan section `.gnu.hash' from `linker stubs' being placed in section `.gnu.hash'.
> > KSYM .tmp_kallsyms1.o
> > /opt/gcc-7.3.0-nolibc/powerpc64-linux/bin/powerpc64-linux-ld: warning: orphan section `.gnu.hash' from `linker stubs' being placed in section `.gnu.hash'.
> > KSYM .tmp_kallsyms2.o
> > /opt/gcc-7.3.0-nolibc/powerpc64-linux/bin/powerpc64-linux-ld: warning: orphan section `.gnu.hash' from `linker stubs' being placed in section `.gnu.hash'.
> > KSYM .tmp_kallsyms3.o
> > LD vmlinux
> > /opt/gcc-7.3.0-nolibc/powerpc64-linux/bin/powerpc64-linux-ld: warning: orphan section `.gnu.hash' from `linker stubs' being placed in section `.gnu.hash'.
>
> I reported those a while ago when I started using the native Debian gcc
> on my Powerpc build box.
>
> > But it seems another warning, and I couldn't see your warnings. Could you tell me your gcc version?
>
> Currently, it is the Debian gcc 8.2.0, ld 2.31.1.

Hmm, unfortunately, I couldn't reproduce the ".data..LPBX1" error with
my gcc-8.1.0 + ld-2.30 distributed at https://cdn.kernel.org/pub/tools/crosstool/.
Could you also try to enable CONFIG_GCOV_PROFILE_ALL=y and build the kernel?
If it causes similar error, it should be caused by gcov support.

Thank you,

--
Masami Hiramatsu <[email protected]>

2018-08-27 21:26:53

by Stephen Rothwell

[permalink] [raw]
Subject: Re: linux-next: build warnings from the build of Linus' tree

Hi Masami,

On Sun, 26 Aug 2018 17:10:58 +0900 Masami Hiramatsu <[email protected]> wrote:
>
> Hmm, unfortunately, I couldn't reproduce the ".data..LPBX1" error with
> my gcc-8.1.0 + ld-2.30 distributed at https://cdn.kernel.org/pub/tools/crosstool/.
> Could you also try to enable CONFIG_GCOV_PROFILE_ALL=y and build the kernel?
> If it causes similar error, it should be caused by gcov support.

Using the allyesconfig as a base and disabling CONFIG_COMPILE_TESTING
allowed me to enable COMFIG_GCOV_PROFILE_ALL, but that just generated a
lot more messages. Some about data..Lusan sections (I think).

--
Cheers,
Stephen Rothwell


Attachments:
(No filename) (499.00 B)
OpenPGP digital signature

2018-08-28 00:45:09

by Masami Hiramatsu

[permalink] [raw]
Subject: Re: linux-next: build warnings from the build of Linus' tree

Hi Stephen,

On Tue, 28 Aug 2018 07:23:33 +1000
Stephen Rothwell <[email protected]> wrote:

> Hi Masami,
>
> On Sun, 26 Aug 2018 17:10:58 +0900 Masami Hiramatsu <[email protected]> wrote:
> >
> > Hmm, unfortunately, I couldn't reproduce the ".data..LPBX1" error with
> > my gcc-8.1.0 + ld-2.30 distributed at https://cdn.kernel.org/pub/tools/crosstool/.
> > Could you also try to enable CONFIG_GCOV_PROFILE_ALL=y and build the kernel?
> > If it causes similar error, it should be caused by gcov support.
>
> Using the allyesconfig as a base and disabling CONFIG_COMPILE_TESTING
> allowed me to enable COMFIG_GCOV_PROFILE_ALL, but that just generated a
> lot more messages. Some about data..Lusan sections (I think).

OK, so it sounds like GCOV kernel itself is broken with your toolchain
(native gcc-8.2.0 on ppc64?) as same as arm32.

I added Peter in loop, he is the maintainer of GCOV kernel.

Hi Peter,
I recently added a gcov profiling for ftrace, following Documentation/dev-tools/gcov.rst.
6b7dca401cb1 ("tracing: Allow gcov profiling on only ftrace subsystem")

and it caused may orphan section warnings/errors on arm and powerpc64.
We also found same error happens when CONFIG_GCOV_PROFILE_ALL=y.
So I guess GCOV kernel subsystem broken in some environment.

(cross build)
gcc-7.3.0 + ld-2.30 => arm:NG, arm64:OK, powerpc64:OK
gcc-8.1.0 + ld-2.30 => arm:NG, arm64:OK, powerpc64:OK
(native build?)
gcc-8.2.0 + ld 2.31.1 => powerpc64:NG
gcc-7.2.1 + ld 2.27 => x86-64: OK

ppc64 NG report:
https://lkml.org/lkml/2018/8/24/72

arm NG report:
https://lkml.org/lkml/2018/8/24/345

Would you know how we can fix this issue?

Thank you,

--
Masami Hiramatsu <[email protected]>

2018-08-29 02:13:45

by Greentime Hu

[permalink] [raw]
Subject: Re: linux-next: build warnings from the build of Linus' tree

Arnd Bergmann <[email protected]> 於 2018年8月24日 週五 下午8:48寫道:
>
> On Fri, Aug 24, 2018 at 10:23 AM Masami Hiramatsu <[email protected]> wrote:
> >
> > On Fri, 24 Aug 2018 13:32:06 +1000
> > Stephen Rothwell <[email protected]> wrote:
> >
> > > Hi all,
> > >
> > > After merging the origin tree, today's linux-next build (powerpc
> > > allyesconfig) produced these warnings:
> > >
> > > Maybe introduced by commit
> > >
> > > 6b7dca401cb1 ("tracing: Allow gcov profiling on only ftrace subsystem")
> > >
> > > I am guessing, but that is the only new thing that affects all of
> > > kernel/trace ...
> >
> > Yes, I agree. But I just followed Documentation/dev-tools/gcov.rst
> > to enable profiling in kernel/trace. Hmm, doesn't ppc64 support
> > GCOV_PROFILE? (But as far as I can see, ARCH_HAS_GCOV_PROFILE_ALL
> > is enabled in arch/powerpc/Kconfig)
> >
> > Anyway, I'll try to reproduce it.
>
> Thje same commit causes a link failure on ARM with a randconfig
> kernel (see https://pastebin.com/KspjpyKG for the .config):
>
> `.text.exit' referenced in section `.ARM.exidx.text.exit' of
> kernel/trace/trace_clock.o: defined in discarded section `.text.exit'
> of kernel/trace/trace_clock.o
> `_GLOBAL__sub_D_00100_1_trace_clock_local' referenced in section
> `.fini_array.00100' of kernel/trace/trace_clock.o: defined in
> discarded section `.text.exit' of kernel/trace/trace_clock.o
> `.text.exit' referenced in section `.ARM.exidx.text.exit' of
> kernel/trace/ftrace.o: defined in discarded section `.text.exit' of
> kernel/trace/ftrace.o
> `_GLOBAL__sub_D_00100_1_function_trace_op' referenced in section
> `.fini_array.00100' of kernel/trace/ftrace.o: defined in discarded
> section `.text.exit' of kernel/trace/ftrace.o
> `.text.exit' referenced in section `.ARM.exidx.text.exit' of
> kernel/trace/ring_buffer.o: defined in discarded section `.text.exit'
> of kernel/trace/ring_buffer.o
> `_GLOBAL__sub_D_00100_1_ring_buffer_print_entry_header' referenced in
> section `.fini_array.00100' of kernel/trace/ring_buffer.o: defined in
> discarded section `.text.exit' of kernel/trace/ring_buffer.o
> `.text.exit' referenced in section `.ARM.exidx.text.exit' of
> kernel/trace/ring_buffer_benchmark.o: defined in discarded section
> `.text.exit' of kernel/trace/ring_buffer_benchmark.o
> `_GLOBAL__sub_D_00100_1_ring_buffer_benchmark.c' referenced in section
> `.fini_array.00100' of kernel/trace/ring_buffer_benchmark.o: defined
> in discarded section `.text.exit' of
> kernel/trace/ring_buffer_benchmark.o
> `.text.exit' referenced in section `.ARM.exidx.text.exit' of
> kernel/trace/trace.o: defined in discarded section `.text.exit' of
> kernel/trace/trace.o
> `_GLOBAL__sub_D_00100_1_ns2usecs' referenced in section
> `.fini_array.00100' of kernel/trace/trace.o: defined in discarded
> section `.text.exit' of kernel/trace/trace.o
> `.text.exit' referenced in section `.ARM.exidx.text.exit' of
> kernel/trace/trace_output.o: defined in discarded section `.text.exit'
> of kernel/trace/trace_output.o
> `_GLOBAL__sub_D_00100_1_trace_event_sem' referenced in section
> `.fini_array.00100' of kernel/trace/trace_output.o: defined in
> discarded section `.text.exit' of kernel/trace/trace_output.o
> `.text.exit' referenced in section `.ARM.exidx.text.exit' of
> kernel/trace/trace_seq.o: defined in discarded section `.text.exit' of
> kernel/trace/trace_seq.o
> `_GLOBAL__sub_D_00100_1_trace_print_seq' referenced in section
> `.fini_array.00100' of kernel/trace/trace_seq.o: defined in discarded
> section `.text.exit' of kernel/trace/trace_seq.o
> `.text.exit' referenced in section `.ARM.exidx.text.exit' of
> kernel/trace/trace_stat.o: defined in discarded section `.text.exit'
> of kernel/trace/trace_stat.o
> `_GLOBAL__sub_D_00100_1_register_stat_tracer' referenced in section
> `.fini_array.00100' of kernel/trace/trace_stat.o: defined in discarded
> section `.text.exit' of kernel/trace/trace_stat.o
> `.text.exit' referenced in section `.ARM.exidx.text.exit' of
> kernel/trace/trace_printk.o: defined in discarded section `.text.exit'
> of kernel/trace/trace_printk.o
> `_GLOBAL__sub_D_00100_1_trace_printk_control' referenced in section
> `.fini_array.00100' of kernel/trace/trace_printk.o: defined in
> discarded section `.text.exit' of kernel/trace/trace_printk.o
> `.text.exit' referenced in section `.ARM.exidx.text.exit' of
> kernel/trace/trace_sched_switch.o: defined in discarded section
> `.text.exit' of kernel/trace/trace_sched_switch.o
> `_GLOBAL__sub_D_00100_1_tracing_start_cmdline_record' referenced in
> section `.fini_array.00100' of kernel/trace/trace_sched_switch.o:
> defined in discarded section `.text.exit' of
> kernel/trace/trace_sched_switch.o
> `.text.exit' referenced in section `.ARM.exidx.text.exit' of
> kernel/trace/trace_functions.o: defined in discarded section
> `.text.exit' of kernel/trace/trace_functions.o
> `_GLOBAL__sub_D_00100_1_ftrace_create_function_files' referenced in
> section `.fini_array.00100' of kernel/trace/trace_functions.o: defined
> in discarded section `.text.exit' of kernel/trace/trace_functions.o
> `.text.exit' referenced in section `.ARM.exidx.text.exit' of
> kernel/trace/trace_preemptirq.o: defined in discarded section
> `.text.exit' of kernel/trace/trace_preemptirq.o
> `_GLOBAL__sub_D_00100_1___tracepoint_irq_disable' referenced in
> section `.fini_array.00100' of kernel/trace/trace_preemptirq.o:
> defined in discarded section `.text.exit' of
> kernel/trace/trace_preemptirq.o
> `.text.exit' referenced in section `.ARM.exidx.text.exit' of
> kernel/trace/trace_irqsoff.o: defined in discarded section
> `.text.exit' of kernel/trace/trace_irqsoff.o
> `_GLOBAL__sub_D_00100_1_start_critical_timings' referenced in section
> `.fini_array.00100' of kernel/trace/trace_irqsoff.o: defined in
> discarded section `.text.exit' of kernel/trace/trace_irqsoff.o
> `.text.exit' referenced in section `.ARM.exidx.text.exit' of
> kernel/trace/trace_sched_wakeup.o: defined in discarded section
> `.text.exit' of kernel/trace/trace_sched_wakeup.o
> `_GLOBAL__sub_D_00100_1_trace_sched_wakeup.c' referenced in section
> `.fini_array.00100' of kernel/trace/trace_sched_wakeup.o: defined in
> discarded section `.text.exit' of kernel/trace/trace_sched_wakeup.o
> `.text.exit' referenced in section `.ARM.exidx.text.exit' of
> kernel/trace/trace_hwlat.o: defined in discarded section `.text.exit'
> of kernel/trace/trace_hwlat.o
> `_GLOBAL__sub_D_00100_1_trace_hwlat_callback' referenced in section
> `.fini_array.00100' of kernel/trace/trace_hwlat.o: defined in
> discarded section `.text.exit' of kernel/trace/trace_hwlat.o
> `.text.exit' referenced in section `.ARM.exidx.text.exit' of
> kernel/trace/trace_nop.o: defined in discarded section `.text.exit' of
> kernel/trace/trace_nop.o
> `_GLOBAL__sub_D_00100_1_nop_trace' referenced in section
> `.fini_array.00100' of kernel/trace/trace_nop.o: defined in discarded
> section `.text.exit' of kernel/trace/trace_nop.o
> `.text.exit' referenced in section `.ARM.exidx.text.exit' of
> kernel/trace/trace_stack.o: defined in discarded section `.text.exit'
> of kernel/trace/trace_stack.o
> `_GLOBAL__sub_D_00100_1_stack_trace_max' referenced in section
> `.fini_array.00100' of kernel/trace/trace_stack.o: defined in
> discarded section `.text.exit' of kernel/trace/trace_stack.o
> `.text.exit' referenced in section `.ARM.exidx.text.exit' of
> kernel/trace/trace_branch.o: defined in discarded section `.text.exit'
> of kernel/trace/trace_branch.o
> `_GLOBAL__sub_D_00100_1_enable_branch_tracing' referenced in section
> `.fini_array.00100' of kernel/trace/trace_branch.o: defined in
> discarded section `.text.exit' of kernel/trace/trace_branch.o
> `.text.exit' referenced in section `.ARM.exidx.text.exit' of
> kernel/trace/trace_events.o: defined in discarded section `.text.exit'
> of kernel/trace/trace_events.o
> `_GLOBAL__sub_D_00100_1_event_mutex' referenced in section
> `.fini_array.00100' of kernel/trace/trace_events.o: defined in
> discarded section `.text.exit' of kernel/trace/trace_events.o
> `.text.exit' referenced in section `.ARM.exidx.text.exit' of
> kernel/trace/trace_export.o: defined in discarded section `.text.exit'
> of kernel/trace/trace_export.o
> `_GLOBAL__sub_D_00100_1_ftrace_event_is_function' referenced in
> section `.fini_array.00100' of kernel/trace/trace_export.o: defined in
> discarded section `.text.exit' of kernel/trace/trace_export.o
> `.text.exit' referenced in section `.ARM.exidx.text.exit' of
> kernel/trace/trace_event_perf.o: defined in discarded section
> `.text.exit' of kernel/trace/trace_event_perf.o
> `_GLOBAL__sub_D_00100_1_perf_trace_init' referenced in section
> `.fini_array.00100' of kernel/trace/trace_event_perf.o: defined in
> discarded section `.text.exit' of kernel/trace/trace_event_perf.o
> `.text.exit' referenced in section `.ARM.exidx.text.exit' of
> kernel/trace/trace_events_filter.o: defined in discarded section
> `.text.exit' of kernel/trace/trace_events_filter.o
> `_GLOBAL__sub_D_00100_1_filter_parse_regex' referenced in section
> `.fini_array.00100' of kernel/trace/trace_events_filter.o: defined in
> discarded section `.text.exit' of kernel/trace/trace_events_filter.o
> `.text.exit' referenced in section `.ARM.exidx.text.exit' of
> kernel/trace/trace_events_trigger.o: defined in discarded section
> `.text.exit' of kernel/trace/trace_events_trigger.o
> `_GLOBAL__sub_D_00100_1_trigger_data_free' referenced in section
> `.fini_array.00100' of kernel/trace/trace_events_trigger.o: defined in
> discarded section `.text.exit' of kernel/trace/trace_events_trigger.o
> `.text.exit' referenced in section `.ARM.exidx.text.exit' of
> kernel/trace/power-traces.o: defined in discarded section `.text.exit'
> of kernel/trace/power-traces.o
> `_GLOBAL__sub_D_00100_1___tracepoint_cpu_idle' referenced in section
> `.fini_array.00100' of kernel/trace/power-traces.o: defined in
> discarded section `.text.exit' of kernel/trace/power-traces.o
> `.text.exit' referenced in section `.ARM.exidx.text.exit' of
> kernel/trace/rpm-traces.o: defined in discarded section `.text.exit'
> of kernel/trace/rpm-traces.o
> `_GLOBAL__sub_D_00100_1___tracepoint_rpm_suspend' referenced in
> section `.fini_array.00100' of kernel/trace/rpm-traces.o: defined in
> discarded section `.text.exit' of kernel/trace/rpm-traces.o
> `.text.exit' referenced in section `.ARM.exidx.text.exit' of
> kernel/trace/trace_benchmark.o: defined in discarded section
> `.text.exit' of kernel/trace/trace_benchmark.o
> `_GLOBAL__sub_D_00100_1___tracepoint_benchmark_event' referenced in
> section `.fini_array.00100' of kernel/trace/trace_benchmark.o: defined
> in discarded section `.text.exit' of kernel/trace/trace_benchmark.o

It seems, happened in nds32 with allmodconfig.

gcc version: 8.0.1
binutil version: 2.30.51.20180307

greentime@atcsqa02:/sqa2s/greentime/v3-upstream/linux <next-4.19> $
PATH=/sqa2s/greentime/v3-upstream/toolchain/nds32le-linux-glibc-v3-upstream2/bin:$PATH
ARCH=nds32 CROSS_COMPILE=nds32le-linux- nds32le-linux-ld -EL
--no-undefined -X --build-id -X -o .tmp_vmlinux1 -T
./arch/nds32/kernel/vmlinux.lds --whole-archive built-in.a
--no-whole-archive --start-group lib/lib.a arch/nds32/lib/lib.a
--end-group
`.text.exit' referenced in section `.dtors.65435' of
kernel/trace/ftrace.o: defined in discarded section `.text.exit' of
kernel/trace/ftrace.o
`.text.exit' referenced in section `.dtors.65435' of
kernel/trace/ring_buffer.o: defined in discarded section `.text.exit'
of kernel/trace/ring_buffer.o
`.text.exit' referenced in section `.dtors.65435' of
kernel/trace/trace.o: defined in discarded section `.text.exit' of
kernel/trace/trace.o
`.text.exit' referenced in section `.dtors.65435' of
kernel/trace/trace_output.o: defined in discarded section `.text.exit'
of kernel/trace/trace_output.o
`.text.exit' referenced in section `.dtors.65435' of
kernel/trace/trace_printk.o: defined in discarded section `.text.exit'
of kernel/trace/trace_printk.o
`.text.exit' referenced in section `.dtors.65435' of
kernel/trace/trace_functions.o: defined in discarded section
`.text.exit' of kernel/trace/trace_functions.o
`.text.exit' referenced in section `.dtors.65435' of
kernel/trace/trace_preemptirq.o: defined in discarded section
`.text.exit' of kernel/trace/trace_preemptirq.o
`.text.exit' referenced in section `.dtors.65435' of
kernel/trace/trace_irqsoff.o: defined in discarded section
`.text.exit' of kernel/trace/trace_irqsoff.o
`.text.exit' referenced in section `.dtors.65435' of
kernel/trace/trace_sched_wakeup.o: defined in discarded section
`.text.exit' of kernel/trace/trace_sched_wakeup.o
`.text.exit' referenced in section `.dtors.65435' of
kernel/trace/trace_hwlat.o: defined in discarded section `.text.exit'
of kernel/trace/trace_hwlat.o
`.text.exit' referenced in section `.dtors.65435' of
kernel/trace/trace_stack.o: defined in discarded section `.text.exit'
of kernel/trace/trace_stack.o
`.text.exit' referenced in section `.dtors.65435' of
kernel/trace/trace_functions_graph.o: defined in discarded section
`.text.exit' of kernel/trace/trace_functions_graph.o
`.text.exit' referenced in section `.dtors.65435' of
kernel/trace/blktrace.o: defined in discarded section `.text.exit' of
kernel/trace/blktrace.o
`.text.exit' referenced in section `.dtors.65435' of
kernel/trace/trace_events.o: defined in discarded section `.text.exit'
of kernel/trace/trace_events.o
`.text.exit' referenced in section `.dtors.65435' of
kernel/trace/trace_export.o: defined in discarded section `.text.exit'
of kernel/trace/trace_export.o
`.text.exit' referenced in section `.dtors.65435' of
kernel/trace/trace_events_filter.o: defined in discarded section
`.text.exit' of kernel/trace/trace_events_filter.o
`.text.exit' referenced in section `.dtors.65435' of
kernel/trace/trace_events_trigger.o: defined in discarded section
`.text.exit' of kernel/trace/trace_events_trigger.o
`.text.exit' referenced in section `.dtors.65435' of
kernel/trace/power-traces.o: defined in discarded section `.text.exit'
of kernel/trace/power-traces.o
`.text.exit' referenced in section `.dtors.65435' of
kernel/trace/trace_benchmark.o: defined in discarded section
`.text.exit' of kernel/trace/trace_benchmark.o
`.text.exit' referenced in section `.dtors.65435' of
kernel/trace/trace_selftest_dynamic.o: defined in discarded section
`.text.exit' of kernel/trace/trace_selftest_dynamic.o
`.text.exit' referenced in section `.dtors.65435' of
kernel/trace/trace_clock.o: defined in discarded section `.text.exit'
of kernel/trace/trace_clock.o
`.text.exit' referenced in section `.dtors.65435' of
kernel/trace/trace_seq.o: defined in discarded section `.text.exit' of
kernel/trace/trace_seq.o
`.text.exit' referenced in section `.dtors.65435' of
kernel/trace/trace_stat.o: defined in discarded section `.text.exit'
of kernel/trace/trace_stat.o
`.text.exit' referenced in section `.dtors.65435' of
kernel/trace/trace_sched_switch.o: defined in discarded section
`.text.exit' of kernel/trace/trace_sched_switch.o
`.text.exit' referenced in section `.dtors.65435' of
kernel/trace/trace_nop.o: defined in discarded section `.text.exit' of
kernel/trace/trace_nop.o

2018-09-01 09:52:35

by Masami Hiramatsu

[permalink] [raw]
Subject: Re: linux-next: build warnings from the build of Linus' tree

Hi Arnd,

On Sat, 25 Aug 2018 21:53:17 +0200
Arnd Bergmann <[email protected]> wrote:

> On Sat, Aug 25, 2018 at 8:53 PM Masami Hiramatsu <[email protected]> wrote:
> > On Fri, 24 Aug 2018 14:46:16 +0200
> > Arnd Bergmann <[email protected]> wrote:
> > > On Fri, Aug 24, 2018 at 10:23 AM Masami Hiramatsu <[email protected]> wrote:
> > > >
> > > > On Fri, 24 Aug 2018 13:32:06 +1000
> > > > Stephen Rothwell <[email protected]> wrote:
> > > >
> > > > > Hi all,
> > > > >
> > > > > After merging the origin tree, today's linux-next build (powerpc
> > > > > allyesconfig) produced these warnings:
> > > > >
> > > > > Maybe introduced by commit
> > > > >
> > > > > 6b7dca401cb1 ("tracing: Allow gcov profiling on only ftrace subsystem")
> > > > >
> > > > > I am guessing, but that is the only new thing that affects all of
> > > > > kernel/trace ...
> > > >
> > > > Yes, I agree. But I just followed Documentation/dev-tools/gcov.rst
> > > > to enable profiling in kernel/trace. Hmm, doesn't ppc64 support
> > > > GCOV_PROFILE? (But as far as I can see, ARCH_HAS_GCOV_PROFILE_ALL
> > > > is enabled in arch/powerpc/Kconfig)
> > > >
> > > > Anyway, I'll try to reproduce it.
> > >
> > > Thje same commit causes a link failure on ARM with a randconfig
> > > kernel (see https://pastebin.com/KspjpyKG for the .config):
> >
> > OK, I confirmed that this happened with both gcc-7.3.0 and gcc-8.1.0
> > with your config.
> > I also confirmed that CONFIG_GCOV_PROFILE_ALL causes same issue.
> > (Note that CONFIG_GCOV_PROFILE_ALL depends on !CONFIG_COMPILE_TEST,
> > so allyesconfig disables it always)
> >
> > Hmm, now gcov kernel itself might have a problem on arm and
> > powerpc(on gcc-8)?
>
> Yes, that is very possible. I always force CONFIG_COMPILE_TEST=y
> in my randconfig tests, so I miss that kind of problem.

Finally, I've found that this issue (on arm) can be reproduced
with a combination of config options.

When CONFIG_BUG=n and CONFIG_GCOV_PROFILE_ALL|FTRACE=y on arm,
this happened. If I set CONFIG_BUG=y, I could build the kernel
without these errors.

I also built on x86-64 with CONFIG_BUG=n & CONFIG_GCOV_PROFILE_FTRACE=y,
but it succeeded. I guess arm kernel need to embed a counter near the
code section. So if it is in .text.exit, it caused the error.

On arch/arm/kernel/vmlinux.lds.h:

#if (defined(CONFIG_SMP_ON_UP) && !defined(CONFIG_DEBUG_SPINLOCK)) || \
defined(CONFIG_GENERIC_BUG) || defined(CONFIG_JUMP_LABEL)
#define ARM_EXIT_KEEP(x) x
#define ARM_EXIT_DISCARD(x)
#else
#define ARM_EXIT_KEEP(x)
#define ARM_EXIT_DISCARD(x) x
#endif

So I think we have to add CONFIG_GCOV_KERNEL to there.

Thank you,

--
Masami Hiramatsu <[email protected]>

2018-09-01 12:40:22

by Masami Hiramatsu

[permalink] [raw]
Subject: [PATCH] ARM: linker script: GCOV kernel may refers data in __exit

GCOV kernel embeds counters in the kernel for each line
and a part of that embed in __exit text. So we need to
keep the __exit text if CONFIG_GCOV_KERNEL=y.

Without this patch, if we discards __exit text (e.g.
disables CONFIG_GENERIC_BUG, CONFIG_JUMP_LABEL and
CONFIG_SMP_ON_UP) but enables CONFIG_GCOV_PROFILE_FTRACE,
ld will error like below on ARM.

`.text.exit' referenced in section `.ARM.exidx.text.exit' of
kernel/trace/trace_clock.o: defined in discarded section `.text.exit'
of kernel/trace/trace_clock.o

To fix this issue, we keep __exit when CONFIG_GCOV_KERNEL=y.

The reason why not depending CONFIG_GCOV_PROFILE_X, is
that the Documentation/dev-tools/gcov.rst says that the
developer can enable gcov profile on a file or a directory
by customizing Makefile, and that will only depend on
CONFIG_GCOV_KERNEL.

Signed-off-by: Masami Hiramatsu <[email protected]>
Reported-by: Arnd Bergmann <[email protected]>
---
arch/arm/kernel/vmlinux.lds.h | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/arch/arm/kernel/vmlinux.lds.h b/arch/arm/kernel/vmlinux.lds.h
index ae5fdff18406..baaacee9f5ce 100644
--- a/arch/arm/kernel/vmlinux.lds.h
+++ b/arch/arm/kernel/vmlinux.lds.h
@@ -9,7 +9,8 @@
#endif

#if (defined(CONFIG_SMP_ON_UP) && !defined(CONFIG_DEBUG_SPINLOCK)) || \
- defined(CONFIG_GENERIC_BUG) || defined(CONFIG_JUMP_LABEL)
+ defined(CONFIG_GENERIC_BUG) || defined(CONFIG_JUMP_LABEL) || \
+ defined(CONFIG_GCOV_KERNEL)
#define ARM_EXIT_KEEP(x) x
#define ARM_EXIT_DISCARD(x)
#else


2018-09-06 12:54:33

by Peter Oberparleiter

[permalink] [raw]
Subject: Re: linux-next: build warnings from the build of Linus' tree

On 28.08.2018 02:43, Masami Hiramatsu wrote:
> I recently added a gcov profiling for ftrace, following Documentation/dev-tools/gcov.rst.
> 6b7dca401cb1 ("tracing: Allow gcov profiling on only ftrace subsystem")
>
> and it caused may orphan section warnings/errors on arm and powerpc64.
> We also found same error happens when CONFIG_GCOV_PROFILE_ALL=y.
> So I guess GCOV kernel subsystem broken in some environment.

I can confirm that these issues are unrelated to your commit which only
made the existing problems visible by enabling gcov-kernel profiling for
allyesconfig builds. Both problems already exist in v4.18 and likely
earlier versions.

Problem 1: link failure on arm
(https://lkml.org/lkml/2018/8/24/345)

The root cause appears to be that the arm linker script only partially
discards unneeded sections generated by the compiler when gcov-kernel
profiling is enabled.

Problem 2: linker warnings on powerpc
(https://lkml.org/lkml/2018/8/24/72)

CONFIG_LD_DEAD_CODE_DATA_ELIMINATION=y adds compiler flag
-fdata-sections. This option causes GCC to create separate data sections
for data objects, including those generated by GCC internally for gcov
profiling. Since the name of these internal data objects starts with a .
(.LPBX0, .LPBX1), the resulting section name starts with "data..". As
section names starting with "data.." are used for specific purposes in
the Linux kernel, the linker script does not automatically handle them,
resulting in the "orphan section" linker warnings.

I've attached a quick fix that should address both problems. I'd
appreciate if this patch could get some testing before I post proper fix
patches.

-- >8 --
diff --git a/arch/arm/kernel/vmlinux.lds.h b/arch/arm/kernel/vmlinux.lds.h
index ae5fdff18406..2ca33277a28b 100644
--- a/arch/arm/kernel/vmlinux.lds.h
+++ b/arch/arm/kernel/vmlinux.lds.h
@@ -48,6 +48,7 @@

#define ARM_DISCARD \
*(.ARM.exidx.exit.text) \
+ *(.ARM.exidx.text.exit) \
*(.ARM.extab.exit.text) \
ARM_CPU_DISCARD(*(.ARM.exidx.cpuexit.text)) \
ARM_CPU_DISCARD(*(.ARM.extab.cpuexit.text)) \
diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinux.lds.h
index 7b75ff6e2fce..5cf3b90c5592 100644
--- a/include/asm-generic/vmlinux.lds.h
+++ b/include/asm-generic/vmlinux.lds.h
@@ -68,7 +68,7 @@
*/
#ifdef CONFIG_LD_DEAD_CODE_DATA_ELIMINATION
#define TEXT_MAIN .text .text.[0-9a-zA-Z_]*
-#define DATA_MAIN .data .data.[0-9a-zA-Z_]*
+#define DATA_MAIN .data .data.[0-9a-zA-Z_]* .data..LPBX*
#define SDATA_MAIN .sdata .sdata.[0-9a-zA-Z_]*
#define RODATA_MAIN .rodata .rodata.[0-9a-zA-Z_]*
#define BSS_MAIN .bss .bss.[0-9a-zA-Z_]*
@@ -613,7 +613,7 @@

#define EXIT_DATA \
*(.exit.data .exit.data.*) \
- *(.fini_array) \
+ *(.fini_array .fini_array.*) \
*(.dtors) \
MEM_DISCARD(exit.data*) \
MEM_DISCARD(exit.rodata*)
--
Peter Oberparleiter
Linux on Z Development - IBM Germany


2018-09-06 16:44:14

by Masami Hiramatsu

[permalink] [raw]
Subject: Re: linux-next: build warnings from the build of Linus' tree

On Thu, 6 Sep 2018 12:49:39 +0200
Peter Oberparleiter <[email protected]> wrote:

> On 28.08.2018 02:43, Masami Hiramatsu wrote:
> > I recently added a gcov profiling for ftrace, following Documentation/dev-tools/gcov.rst.
> > 6b7dca401cb1 ("tracing: Allow gcov profiling on only ftrace subsystem")
> >
> > and it caused may orphan section warnings/errors on arm and powerpc64.
> > We also found same error happens when CONFIG_GCOV_PROFILE_ALL=y.
> > So I guess GCOV kernel subsystem broken in some environment.
>
> I can confirm that these issues are unrelated to your commit which only
> made the existing problems visible by enabling gcov-kernel profiling for
> allyesconfig builds. Both problems already exist in v4.18 and likely
> earlier versions.
>
> Problem 1: link failure on arm
> (https://lkml.org/lkml/2018/8/24/345)
>
> The root cause appears to be that the arm linker script only partially
> discards unneeded sections generated by the compiler when gcov-kernel
> profiling is enabled.
>
> Problem 2: linker warnings on powerpc
> (https://lkml.org/lkml/2018/8/24/72)
>
> CONFIG_LD_DEAD_CODE_DATA_ELIMINATION=y adds compiler flag
> -fdata-sections. This option causes GCC to create separate data sections
> for data objects, including those generated by GCC internally for gcov
> profiling. Since the name of these internal data objects starts with a .
> (.LPBX0, .LPBX1), the resulting section name starts with "data..". As
> section names starting with "data.." are used for specific purposes in
> the Linux kernel, the linker script does not automatically handle them,
> resulting in the "orphan section" linker warnings.

Good catch! I didn't know that option.

>
> I've attached a quick fix that should address both problems. I'd
> appreciate if this patch could get some testing before I post proper fix
> patches.

Hmm, I'm still not able to reproduce it on powerpc cross build even with
CONFIG_LD_DEAD_CODE_DATA_ELIMINATION=y ... So, sorry I couldn't test this patch.

>
> -- >8 --
> diff --git a/arch/arm/kernel/vmlinux.lds.h b/arch/arm/kernel/vmlinux.lds.h
> index ae5fdff18406..2ca33277a28b 100644
> --- a/arch/arm/kernel/vmlinux.lds.h
> +++ b/arch/arm/kernel/vmlinux.lds.h
> @@ -48,6 +48,7 @@
>
> #define ARM_DISCARD \
> *(.ARM.exidx.exit.text) \
> + *(.ARM.exidx.text.exit) \

BTW, why would we need this?

Thanks,

> *(.ARM.extab.exit.text) \
> ARM_CPU_DISCARD(*(.ARM.exidx.cpuexit.text)) \
> ARM_CPU_DISCARD(*(.ARM.extab.cpuexit.text)) \
> diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinux.lds.h
> index 7b75ff6e2fce..5cf3b90c5592 100644
> --- a/include/asm-generic/vmlinux.lds.h
> +++ b/include/asm-generic/vmlinux.lds.h
> @@ -68,7 +68,7 @@
> */
> #ifdef CONFIG_LD_DEAD_CODE_DATA_ELIMINATION
> #define TEXT_MAIN .text .text.[0-9a-zA-Z_]*
> -#define DATA_MAIN .data .data.[0-9a-zA-Z_]*
> +#define DATA_MAIN .data .data.[0-9a-zA-Z_]* .data..LPBX*
> #define SDATA_MAIN .sdata .sdata.[0-9a-zA-Z_]*
> #define RODATA_MAIN .rodata .rodata.[0-9a-zA-Z_]*
> #define BSS_MAIN .bss .bss.[0-9a-zA-Z_]*
> @@ -613,7 +613,7 @@
>
> #define EXIT_DATA \
> *(.exit.data .exit.data.*) \
> - *(.fini_array) \
> + *(.fini_array .fini_array.*) \
> *(.dtors) \
> MEM_DISCARD(exit.data*) \
> MEM_DISCARD(exit.rodata*)
> --
> Peter Oberparleiter
> Linux on Z Development - IBM Germany
>


--
Masami Hiramatsu <[email protected]>

2018-09-06 23:30:31

by Stephen Rothwell

[permalink] [raw]
Subject: Re: linux-next: build warnings from the build of Linus' tree

Hi Peter,

On Thu, 6 Sep 2018 12:49:39 +0200 Peter Oberparleiter <[email protected]> wrote:
>
> I've attached a quick fix that should address both problems. I'd
> appreciate if this patch could get some testing before I post proper fix
> patches.

I have added that into linux-next today ... I will let you know this
afternoon how it went (it looks sensible, though).

--
Cheers,
Stephen Rothwell


Attachments:
(No filename) (499.00 B)
OpenPGP digital signature

2018-09-07 03:36:26

by Stephen Rothwell

[permalink] [raw]
Subject: Re: linux-next: build warnings from the build of Linus' tree

Hi Peter,

On Fri, 7 Sep 2018 08:14:40 +1000 Stephen Rothwell <[email protected]> wrote:
>
> On Thu, 6 Sep 2018 12:49:39 +0200 Peter Oberparleiter <[email protected]> wrote:
> >
> > I've attached a quick fix that should address both problems. I'd
> > appreciate if this patch could get some testing before I post proper fix
> > patches.
>
> I have added that into linux-next today ... I will let you know this
> afternoon how it went (it looks sensible, though).

It certainly gets rid of the PowerPC linker messages, thanks.

--
Cheers,
Stephen Rothwell


Attachments:
(No filename) (499.00 B)
OpenPGP digital signature

2018-09-07 13:14:14

by Peter Oberparleiter

[permalink] [raw]
Subject: Re: linux-next: build warnings from the build of Linus' tree

On 06.09.2018 18:42, Masami Hiramatsu wrote:
> Peter Oberparleiter <[email protected]> wrote:
>> I've attached a quick fix that should address both problems. I'd
>> appreciate if this patch could get some testing before I post proper fix
>> patches.
>
> Hmm, I'm still not able to reproduce it on powerpc cross build even with
> CONFIG_LD_DEAD_CODE_DATA_ELIMINATION=y ... So, sorry I couldn't test this patch.

Maybe this is related to the compiler/binutils versions used. I'm using
Fedora 28's gcc-powerpc64 and binutils-powerpc64 packages:

powerpc64-linux-gnu-gcc (GCC) 7.1.1 20170622 (Red Hat Cross 7.1.1-3)
GNU ld version 2.29.1-4.fc28

For reference I'm also attaching the config that I used to reproduce the
problem on kernel v4.18.

>> diff --git a/arch/arm/kernel/vmlinux.lds.h b/arch/arm/kernel/vmlinux.lds.h
>> index ae5fdff18406..2ca33277a28b 100644
>> --- a/arch/arm/kernel/vmlinux.lds.h
>> +++ b/arch/arm/kernel/vmlinux.lds.h
>> @@ -48,6 +48,7 @@
>>
>> #define ARM_DISCARD \
>> *(.ARM.exidx.exit.text) \
>> + *(.ARM.exidx.text.exit) \
>
> BTW, why would we need this?

That's necessary to fix one of the two ARM linker failures reported via
https://lkml.org/lkml/2018/8/24/345

>>> `.text.exit' referenced in section `.ARM.exidx.text.exit' of
>>> kernel/trace/trace_clock.o: defined in discarded section `.text.exit'
>>> of kernel/trace/trace_clock.o

Section ".ARM.exidx.text.exit" refers to ".text.exit" which was
discarded. With the change above, the extraneous section
".ARM.exidx.text.exit" is also discarded, resolving the linker failure.

--
Peter Oberparleiter
Linux on Z Development - IBM Germany


Attachments:
config (96.44 kB)

2018-09-08 03:59:18

by Masami Hiramatsu

[permalink] [raw]
Subject: Re: linux-next: build warnings from the build of Linus' tree

On Fri, 7 Sep 2018 14:50:59 +0200
Peter Oberparleiter <[email protected]> wrote:

> On 06.09.2018 18:42, Masami Hiramatsu wrote:
> > Peter Oberparleiter <[email protected]> wrote:
> >> I've attached a quick fix that should address both problems. I'd
> >> appreciate if this patch could get some testing before I post proper fix
> >> patches.
> >
> > Hmm, I'm still not able to reproduce it on powerpc cross build even with
> > CONFIG_LD_DEAD_CODE_DATA_ELIMINATION=y ... So, sorry I couldn't test this patch.
>
> Maybe this is related to the compiler/binutils versions used. I'm using
> Fedora 28's gcc-powerpc64 and binutils-powerpc64 packages:
>
> powerpc64-linux-gnu-gcc (GCC) 7.1.1 20170622 (Red Hat Cross 7.1.1-3)
> GNU ld version 2.29.1-4.fc28
>
> For reference I'm also attaching the config that I used to reproduce the
> problem on kernel v4.18.
>
> >> diff --git a/arch/arm/kernel/vmlinux.lds.h b/arch/arm/kernel/vmlinux.lds.h
> >> index ae5fdff18406..2ca33277a28b 100644
> >> --- a/arch/arm/kernel/vmlinux.lds.h
> >> +++ b/arch/arm/kernel/vmlinux.lds.h
> >> @@ -48,6 +48,7 @@
> >>
> >> #define ARM_DISCARD \
> >> *(.ARM.exidx.exit.text) \
> >> + *(.ARM.exidx.text.exit) \
> >
> > BTW, why would we need this?
>
> That's necessary to fix one of the two ARM linker failures reported via
> https://lkml.org/lkml/2018/8/24/345
>
> >>> `.text.exit' referenced in section `.ARM.exidx.text.exit' of
> >>> kernel/trace/trace_clock.o: defined in discarded section `.text.exit'
> >>> of kernel/trace/trace_clock.o
>
> Section ".ARM.exidx.text.exit" refers to ".text.exit" which was
> discarded. With the change above, the extraneous section
> ".ARM.exidx.text.exit" is also discarded, resolving the linker failure.

OK, so your patch fixes following issue too?

https://patchwork.kernel.org/patch/10584685/

In that case, we should drop above patch.

Thank you,


--
Masami Hiramatsu <[email protected]>

2018-09-10 13:31:40

by Peter Oberparleiter

[permalink] [raw]
Subject: Re: linux-next: build warnings from the build of Linus' tree

On 08.09.2018 05:57, Masami Hiramatsu wrote:
> On Fri, 7 Sep 2018 14:50:59 +0200
> Peter Oberparleiter <[email protected]> wrote:
>
>> On 06.09.2018 18:42, Masami Hiramatsu wrote:
>>> Peter Oberparleiter <[email protected]> wrote:
>>>> I've attached a quick fix that should address both problems. I'd
>>>> appreciate if this patch could get some testing before I post proper fix
>>>> patches.
>>>
>>> Hmm, I'm still not able to reproduce it on powerpc cross build even with
>>> CONFIG_LD_DEAD_CODE_DATA_ELIMINATION=y ... So, sorry I couldn't test this patch.
>>
>> Maybe this is related to the compiler/binutils versions used. I'm using
>> Fedora 28's gcc-powerpc64 and binutils-powerpc64 packages:
>>
>> powerpc64-linux-gnu-gcc (GCC) 7.1.1 20170622 (Red Hat Cross 7.1.1-3)
>> GNU ld version 2.29.1-4.fc28
>>
>> For reference I'm also attaching the config that I used to reproduce the
>> problem on kernel v4.18.
>>
>>>> diff --git a/arch/arm/kernel/vmlinux.lds.h b/arch/arm/kernel/vmlinux.lds.h
>>>> index ae5fdff18406..2ca33277a28b 100644
>>>> --- a/arch/arm/kernel/vmlinux.lds.h
>>>> +++ b/arch/arm/kernel/vmlinux.lds.h
>>>> @@ -48,6 +48,7 @@
>>>>
>>>> #define ARM_DISCARD \
>>>> *(.ARM.exidx.exit.text) \
>>>> + *(.ARM.exidx.text.exit) \
>>>
>>> BTW, why would we need this?
>>
>> That's necessary to fix one of the two ARM linker failures reported via
>> https://lkml.org/lkml/2018/8/24/345
>>
>>>>> `.text.exit' referenced in section `.ARM.exidx.text.exit' of
>>>>> kernel/trace/trace_clock.o: defined in discarded section `.text.exit'
>>>>> of kernel/trace/trace_clock.o
>>
>> Section ".ARM.exidx.text.exit" refers to ".text.exit" which was
>> discarded. With the change above, the extraneous section
>> ".ARM.exidx.text.exit" is also discarded, resolving the linker failure.
>
> OK, so your patch fixes following issue too?
>
> https://patchwork.kernel.org/patch/10584685/

Yes it does, by discarding the text.exit section unconditionally. I
don't think we need to keep any exit-related section introduced by GCOV
profiling. It is my understanding that the code contained in such a
section is only relevant for user-space profiling, to process profiling
data when a program ends.

Also discarding .ARM.exidx.text.exit seems to be more consistent to how
.ARM.exidx.exit.text is handled.

> In that case, we should drop above patch.

Yes, I agree.

--
Peter Oberparleiter
Linux on Z Development - IBM Germany


2018-09-11 11:51:37

by Masami Hiramatsu

[permalink] [raw]
Subject: Re: linux-next: build warnings from the build of Linus' tree

On Mon, 10 Sep 2018 15:27:20 +0200
Peter Oberparleiter <[email protected]> wrote:

> On 08.09.2018 05:57, Masami Hiramatsu wrote:
> > On Fri, 7 Sep 2018 14:50:59 +0200
> > Peter Oberparleiter <[email protected]> wrote:
> >
> >> On 06.09.2018 18:42, Masami Hiramatsu wrote:
> >>> Peter Oberparleiter <[email protected]> wrote:
> >>>> I've attached a quick fix that should address both problems. I'd
> >>>> appreciate if this patch could get some testing before I post proper fix
> >>>> patches.
> >>>
> >>> Hmm, I'm still not able to reproduce it on powerpc cross build even with
> >>> CONFIG_LD_DEAD_CODE_DATA_ELIMINATION=y ... So, sorry I couldn't test this patch.
> >>
> >> Maybe this is related to the compiler/binutils versions used. I'm using
> >> Fedora 28's gcc-powerpc64 and binutils-powerpc64 packages:
> >>
> >> powerpc64-linux-gnu-gcc (GCC) 7.1.1 20170622 (Red Hat Cross 7.1.1-3)
> >> GNU ld version 2.29.1-4.fc28
> >>
> >> For reference I'm also attaching the config that I used to reproduce the
> >> problem on kernel v4.18.
> >>
> >>>> diff --git a/arch/arm/kernel/vmlinux.lds.h b/arch/arm/kernel/vmlinux.lds.h
> >>>> index ae5fdff18406..2ca33277a28b 100644
> >>>> --- a/arch/arm/kernel/vmlinux.lds.h
> >>>> +++ b/arch/arm/kernel/vmlinux.lds.h
> >>>> @@ -48,6 +48,7 @@
> >>>>
> >>>> #define ARM_DISCARD \
> >>>> *(.ARM.exidx.exit.text) \
> >>>> + *(.ARM.exidx.text.exit) \
> >>>
> >>> BTW, why would we need this?
> >>
> >> That's necessary to fix one of the two ARM linker failures reported via
> >> https://lkml.org/lkml/2018/8/24/345
> >>
> >>>>> `.text.exit' referenced in section `.ARM.exidx.text.exit' of
> >>>>> kernel/trace/trace_clock.o: defined in discarded section `.text.exit'
> >>>>> of kernel/trace/trace_clock.o
> >>
> >> Section ".ARM.exidx.text.exit" refers to ".text.exit" which was
> >> discarded. With the change above, the extraneous section
> >> ".ARM.exidx.text.exit" is also discarded, resolving the linker failure.
> >
> > OK, so your patch fixes following issue too?
> >
> > https://patchwork.kernel.org/patch/10584685/
>
> Yes it does, by discarding the text.exit section unconditionally. I
> don't think we need to keep any exit-related section introduced by GCOV
> profiling. It is my understanding that the code contained in such a
> section is only relevant for user-space profiling, to process profiling
> data when a program ends.
>
> Also discarding .ARM.exidx.text.exit seems to be more consistent to how
> .ARM.exidx.exit.text is handled.
>
> > In that case, we should drop above patch.
>
> Yes, I agree.

Hm, with your patch (on linus tree), I still have this error on arm cross build.

CC init/version.o
AR init/built-in.a
AR built-in.a
LD vmlinux.o
MODPOST vmlinux.o
`.exit.text' referenced in section `.alt.smp.init' of net/dns_resolver/dns_key.o: defined in discarded section `.exit.text' of net/dns_resolver/dns_key.o

I attached my config.

Since this comes from section discarding, with my patch (which prevent discarding) this error didn't happen.

Thank you,

--
Masami Hiramatsu <[email protected]>


Attachments:
.config (139.72 kB)

2018-09-11 14:10:55

by Masami Hiramatsu

[permalink] [raw]
Subject: Re: linux-next: build warnings from the build of Linus' tree

On Tue, 11 Sep 2018 20:49:25 +0900
Masami Hiramatsu <[email protected]> wrote:

> On Mon, 10 Sep 2018 15:27:20 +0200
> Peter Oberparleiter <[email protected]> wrote:
>
> > On 08.09.2018 05:57, Masami Hiramatsu wrote:
> > > On Fri, 7 Sep 2018 14:50:59 +0200
> > > Peter Oberparleiter <[email protected]> wrote:
> > >
> > >> On 06.09.2018 18:42, Masami Hiramatsu wrote:
> > >>> Peter Oberparleiter <[email protected]> wrote:
> > >>>> I've attached a quick fix that should address both problems. I'd
> > >>>> appreciate if this patch could get some testing before I post proper fix
> > >>>> patches.
> > >>>
> > >>> Hmm, I'm still not able to reproduce it on powerpc cross build even with
> > >>> CONFIG_LD_DEAD_CODE_DATA_ELIMINATION=y ... So, sorry I couldn't test this patch.
> > >>
> > >> Maybe this is related to the compiler/binutils versions used. I'm using
> > >> Fedora 28's gcc-powerpc64 and binutils-powerpc64 packages:
> > >>
> > >> powerpc64-linux-gnu-gcc (GCC) 7.1.1 20170622 (Red Hat Cross 7.1.1-3)
> > >> GNU ld version 2.29.1-4.fc28
> > >>
> > >> For reference I'm also attaching the config that I used to reproduce the
> > >> problem on kernel v4.18.
> > >>
> > >>>> diff --git a/arch/arm/kernel/vmlinux.lds.h b/arch/arm/kernel/vmlinux.lds.h
> > >>>> index ae5fdff18406..2ca33277a28b 100644
> > >>>> --- a/arch/arm/kernel/vmlinux.lds.h
> > >>>> +++ b/arch/arm/kernel/vmlinux.lds.h
> > >>>> @@ -48,6 +48,7 @@
> > >>>>
> > >>>> #define ARM_DISCARD \
> > >>>> *(.ARM.exidx.exit.text) \
> > >>>> + *(.ARM.exidx.text.exit) \
> > >>>
> > >>> BTW, why would we need this?
> > >>
> > >> That's necessary to fix one of the two ARM linker failures reported via
> > >> https://lkml.org/lkml/2018/8/24/345
> > >>
> > >>>>> `.text.exit' referenced in section `.ARM.exidx.text.exit' of
> > >>>>> kernel/trace/trace_clock.o: defined in discarded section `.text.exit'
> > >>>>> of kernel/trace/trace_clock.o
> > >>
> > >> Section ".ARM.exidx.text.exit" refers to ".text.exit" which was
> > >> discarded. With the change above, the extraneous section
> > >> ".ARM.exidx.text.exit" is also discarded, resolving the linker failure.
> > >
> > > OK, so your patch fixes following issue too?
> > >
> > > https://patchwork.kernel.org/patch/10584685/
> >
> > Yes it does, by discarding the text.exit section unconditionally. I
> > don't think we need to keep any exit-related section introduced by GCOV
> > profiling. It is my understanding that the code contained in such a
> > section is only relevant for user-space profiling, to process profiling
> > data when a program ends.
> >
> > Also discarding .ARM.exidx.text.exit seems to be more consistent to how
> > .ARM.exidx.exit.text is handled.
> >
> > > In that case, we should drop above patch.
> >
> > Yes, I agree.
>
> Hm, with your patch (on linus tree), I still have this error on arm cross build.
>
> CC init/version.o
> AR init/built-in.a
> AR built-in.a
> LD vmlinux.o
> MODPOST vmlinux.o
> `.exit.text' referenced in section `.alt.smp.init' of net/dns_resolver/dns_key.o: defined in discarded section `.exit.text' of net/dns_resolver/dns_key.o

Ah, sorry, this is not from GCOV, but alternatives for SMP.
This should be a different issue.

>
> I attached my config.
>
> Since this comes from section discarding, with my patch (which prevent discarding) this error didn't happen.

So, this is just a side effect. your patch is good when CONFIG_DNS_RESOLVER=n

Thank you,


--
Masami Hiramatsu <[email protected]>

2018-09-11 14:13:56

by Masami Hiramatsu

[permalink] [raw]
Subject: Re: [PATCH] ARM: linker script: GCOV kernel may refers data in __exit

Hi,

Please drop it, since Peter's patch fixes this problem better way.

https://lkml.org/lkml/2018/9/6/403

Thank you,

On Sat, 1 Sep 2018 21:38:13 +0900
Masami Hiramatsu <[email protected]> wrote:

> GCOV kernel embeds counters in the kernel for each line
> and a part of that embed in __exit text. So we need to
> keep the __exit text if CONFIG_GCOV_KERNEL=y.
>
> Without this patch, if we discards __exit text (e.g.
> disables CONFIG_GENERIC_BUG, CONFIG_JUMP_LABEL and
> CONFIG_SMP_ON_UP) but enables CONFIG_GCOV_PROFILE_FTRACE,
> ld will error like below on ARM.
>
> `.text.exit' referenced in section `.ARM.exidx.text.exit' of
> kernel/trace/trace_clock.o: defined in discarded section `.text.exit'
> of kernel/trace/trace_clock.o
>
> To fix this issue, we keep __exit when CONFIG_GCOV_KERNEL=y.
>
> The reason why not depending CONFIG_GCOV_PROFILE_X, is
> that the Documentation/dev-tools/gcov.rst says that the
> developer can enable gcov profile on a file or a directory
> by customizing Makefile, and that will only depend on
> CONFIG_GCOV_KERNEL.
>
> Signed-off-by: Masami Hiramatsu <[email protected]>
> Reported-by: Arnd Bergmann <[email protected]>
> ---
> arch/arm/kernel/vmlinux.lds.h | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/arch/arm/kernel/vmlinux.lds.h b/arch/arm/kernel/vmlinux.lds.h
> index ae5fdff18406..baaacee9f5ce 100644
> --- a/arch/arm/kernel/vmlinux.lds.h
> +++ b/arch/arm/kernel/vmlinux.lds.h
> @@ -9,7 +9,8 @@
> #endif
>
> #if (defined(CONFIG_SMP_ON_UP) && !defined(CONFIG_DEBUG_SPINLOCK)) || \
> - defined(CONFIG_GENERIC_BUG) || defined(CONFIG_JUMP_LABEL)
> + defined(CONFIG_GENERIC_BUG) || defined(CONFIG_JUMP_LABEL) || \
> + defined(CONFIG_GCOV_KERNEL)
> #define ARM_EXIT_KEEP(x) x
> #define ARM_EXIT_DISCARD(x)
> #else
>


--
Masami Hiramatsu <[email protected]>

2018-10-11 00:49:11

by Stephen Rothwell

[permalink] [raw]
Subject: Re: linux-next: build warnings from the build of Linus' tree

Hi all,

On Thu, 6 Sep 2018 12:49:39 +0200 Peter Oberparleiter <[email protected]> wrote:
>
> On 28.08.2018 02:43, Masami Hiramatsu wrote:
> > I recently added a gcov profiling for ftrace, following Documentation/dev-tools/gcov.rst.
> > 6b7dca401cb1 ("tracing: Allow gcov profiling on only ftrace subsystem")
> >
> > and it caused may orphan section warnings/errors on arm and powerpc64.
> > We also found same error happens when CONFIG_GCOV_PROFILE_ALL=y.
> > So I guess GCOV kernel subsystem broken in some environment.
>
> I can confirm that these issues are unrelated to your commit which only
> made the existing problems visible by enabling gcov-kernel profiling for
> allyesconfig builds. Both problems already exist in v4.18 and likely
> earlier versions.
>
> Problem 1: link failure on arm
> (https://lkml.org/lkml/2018/8/24/345)
>
> The root cause appears to be that the arm linker script only partially
> discards unneeded sections generated by the compiler when gcov-kernel
> profiling is enabled.
>
> Problem 2: linker warnings on powerpc
> (https://lkml.org/lkml/2018/8/24/72)
>
> CONFIG_LD_DEAD_CODE_DATA_ELIMINATION=y adds compiler flag
> -fdata-sections. This option causes GCC to create separate data sections
> for data objects, including those generated by GCC internally for gcov
> profiling. Since the name of these internal data objects starts with a .
> (.LPBX0, .LPBX1), the resulting section name starts with "data..". As
> section names starting with "data.." are used for specific purposes in
> the Linux kernel, the linker script does not automatically handle them,
> resulting in the "orphan section" linker warnings.
>
> I've attached a quick fix that should address both problems. I'd
> appreciate if this patch could get some testing before I post proper fix
> patches.
>
> -- >8 --
> diff --git a/arch/arm/kernel/vmlinux.lds.h b/arch/arm/kernel/vmlinux.lds.h
> index ae5fdff18406..2ca33277a28b 100644
> --- a/arch/arm/kernel/vmlinux.lds.h
> +++ b/arch/arm/kernel/vmlinux.lds.h
> @@ -48,6 +48,7 @@
>
> #define ARM_DISCARD \
> *(.ARM.exidx.exit.text) \
> + *(.ARM.exidx.text.exit) \
> *(.ARM.extab.exit.text) \
> ARM_CPU_DISCARD(*(.ARM.exidx.cpuexit.text)) \
> ARM_CPU_DISCARD(*(.ARM.extab.cpuexit.text)) \
> diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinux.lds.h
> index 7b75ff6e2fce..5cf3b90c5592 100644
> --- a/include/asm-generic/vmlinux.lds.h
> +++ b/include/asm-generic/vmlinux.lds.h
> @@ -68,7 +68,7 @@
> */
> #ifdef CONFIG_LD_DEAD_CODE_DATA_ELIMINATION
> #define TEXT_MAIN .text .text.[0-9a-zA-Z_]*
> -#define DATA_MAIN .data .data.[0-9a-zA-Z_]*
> +#define DATA_MAIN .data .data.[0-9a-zA-Z_]* .data..LPBX*
> #define SDATA_MAIN .sdata .sdata.[0-9a-zA-Z_]*
> #define RODATA_MAIN .rodata .rodata.[0-9a-zA-Z_]*
> #define BSS_MAIN .bss .bss.[0-9a-zA-Z_]*
> @@ -613,7 +613,7 @@
>
> #define EXIT_DATA \
> *(.exit.data .exit.data.*) \
> - *(.fini_array) \
> + *(.fini_array .fini_array.*) \
> *(.dtors) \
> MEM_DISCARD(exit.data*) \
> MEM_DISCARD(exit.rodata*)
> --
> Peter Oberparleiter
> Linux on Z Development - IBM Germany
>

OK, I have been carrying this "quick fix" patch in linux-next since
September 7. Is anyone going to pick this up and send it to
Greg/Linus, please?

--
Cheers,
Stephen Rothwell


Attachments:
(No filename) (499.00 B)
OpenPGP digital signature

2018-10-11 07:46:07

by Peter Oberparleiter

[permalink] [raw]
Subject: Re: linux-next: build warnings from the build of Linus' tree

On 11.10.2018 02:48, Stephen Rothwell wrote:
> OK, I have been carrying this "quick fix" patch in linux-next since
> September 7. Is anyone going to pick this up and send it to
> Greg/Linus, please?

Sorry about that - I posted a modified fix at

https://lkml.org/lkml/2018/9/13/367

but didn't get a response. I guess I should have reposted sooner. But
before I do that:

Arnd: Is this something that you can pick up or should I include someone
else?

--
Peter Oberparleiter
Linux on Z Development - IBM Germany


2018-10-11 09:59:58

by Stephen Rothwell

[permalink] [raw]
Subject: Re: linux-next: build warnings from the build of Linus' tree

Hi all,

On Thu, 11 Oct 2018 09:44:36 +0200 Peter Oberparleiter <[email protected]> wrote:
>
> On 11.10.2018 02:48, Stephen Rothwell wrote:
> > OK, I have been carrying this "quick fix" patch in linux-next since
> > September 7. Is anyone going to pick this up and send it to
> > Greg/Linus, please?
>
> Sorry about that - I posted a modified fix at
>
> https://lkml.org/lkml/2018/9/13/367
>
> but didn't get a response. I guess I should have reposted sooner. But
> before I do that:
>
> Arnd: Is this something that you can pick up or should I include someone
> else?

It would be nice if it could go in before the v4.19 release because the
commit that exposed the warnings went into v4.19-rc1.

--
Cheers,
Stephen Rothwell


Attachments:
(No filename) (499.00 B)
OpenPGP digital signature

2018-10-11 10:45:53

by Greg KH

[permalink] [raw]
Subject: Re: linux-next: build warnings from the build of Linus' tree

On Thu, Oct 11, 2018 at 08:58:49PM +1100, Stephen Rothwell wrote:
> Hi all,
>
> On Thu, 11 Oct 2018 09:44:36 +0200 Peter Oberparleiter <[email protected]> wrote:
> >
> > On 11.10.2018 02:48, Stephen Rothwell wrote:
> > > OK, I have been carrying this "quick fix" patch in linux-next since
> > > September 7. Is anyone going to pick this up and send it to
> > > Greg/Linus, please?
> >
> > Sorry about that - I posted a modified fix at
> >
> > https://lkml.org/lkml/2018/9/13/367
> >
> > but didn't get a response. I guess I should have reposted sooner. But
> > before I do that:
> >
> > Arnd: Is this something that you can pick up or should I include someone
> > else?
>
> It would be nice if it could go in before the v4.19 release because the
> commit that exposed the warnings went into v4.19-rc1.

I agree. If someone could at least review/ack it, that would be great.
What tree does this normally go through?

thanks,

greg k-h

2018-10-11 12:02:33

by Peter Oberparleiter

[permalink] [raw]
Subject: Re: linux-next: build warnings from the build of Linus' tree

On 11.10.2018 12:37, Greg KH wrote:
> On Thu, Oct 11, 2018 at 08:58:49PM +1100, Stephen Rothwell wrote:
>> On Thu, 11 Oct 2018 09:44:36 +0200 Peter Oberparleiter <[email protected]> wrote:
>>> On 11.10.2018 02:48, Stephen Rothwell wrote:
>>>> OK, I have been carrying this "quick fix" patch in linux-next since
>>>> September 7. Is anyone going to pick this up and send it to
>>>> Greg/Linus, please?
>>>
>>> Sorry about that - I posted a modified fix at
>>>
>>> https://lkml.org/lkml/2018/9/13/367
>>>
>>> but didn't get a response. I guess I should have reposted sooner. But
>>> before I do that:
>>>
>>> Arnd: Is this something that you can pick up or should I include someone
>>> else?
>>
>> It would be nice if it could go in before the v4.19 release because the
>> commit that exposed the warnings went into v4.19-rc1.
>
> I agree. If someone could at least review/ack it, that would be great.
> What tree does this normally go through?

gcov-kernel related changes are usually picked up by Andrew Morton (on
cc now). In this case I wasn't sure who best to address since its mostly
asm-generic/linker script changes.

--
Peter Oberparleiter
Linux on Z Development - IBM Germany


2018-10-11 14:58:59

by Arnd Bergmann

[permalink] [raw]
Subject: Re: linux-next: build warnings from the build of Linus' tree

On 10/11/18, Greg KH <[email protected]> wrote:
> On Thu, Oct 11, 2018 at 08:58:49PM +1100, Stephen Rothwell wrote:
>> Hi all,
>>
>> On Thu, 11 Oct 2018 09:44:36 +0200 Peter Oberparleiter
>> <[email protected]> wrote:
>> >
>> > On 11.10.2018 02:48, Stephen Rothwell wrote:
>> > > OK, I have been carrying this "quick fix" patch in linux-next since
>> > > September 7. Is anyone going to pick this up and send it to
>> > > Greg/Linus, please?
>> >
>> > Sorry about that - I posted a modified fix at
>> >
>> > https://lkml.org/lkml/2018/9/13/367
>> >
>> > but didn't get a response. I guess I should have reposted sooner. But
>> > before I do that:
>> >
>> > Arnd: Is this something that you can pick up or should I include
>> > someone
>> > else?
>>
>> It would be nice if it could go in before the v4.19 release because the
>> commit that exposed the warnings went into v4.19-rc1.
>
> I agree. If someone could at least review/ack it, that would be great.

I've added it to my randconfig test tree and spent the day building
random configurations with this (after reverting the version that Stephen
had in linux-next). The patches both look reasonable to me and the
build warnings did not come back in any obscure configuration, so

Tested-by: Arnd Bergmann <[email protected]>
Acked-by: Arnd Bergmann <[email protected]>

2018-10-11 22:15:04

by Stephen Rothwell

[permalink] [raw]
Subject: [GIT PULL] A couple of warning fixes

Hi Greg,

[Hopefully you and others don't mind fetching these from me directly.]
[My first pull request, let me know if I did something wrong.]

The following changes since commit 0778a9f2dd924c3af41971ba40eec44793aea531:

Merge branch 'for-4.19-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup (2018-10-11 19:24:01 +0200)

are available in the Git repository at:

git://git.kernel.org/pub/scm/linux/kernel/git/sfr/next-fixes.git tags/next-fixes-20181012

for you to fetch changes up to 52c8ee5bad8f33d02c567f6609f43d69303fc48d:

vmlinux.lds.h: Fix linker warnings about orphan .LPBX sections (2018-10-12 08:55:29 +1100)

----------------------------------------------------------------
Two fixes from Peter Oberparleiter <[email protected]>:

Commit

6b7dca401cb1 ("tracing: Allow gcov profiling on only ftrace subsystem")

uncovered linker problems when using gcov kernel profiling on some
architectures. These problems were likely introduced earlier, and are
possibly related to compiler changes.

----------------------------------------------------------------
Peter Oberparleiter (2):
vmlinux.lds.h: Fix incomplete .text.exit discards
vmlinux.lds.h: Fix linker warnings about orphan .LPBX sections

arch/arm/kernel/vmlinux.lds.h | 2 ++
include/asm-generic/vmlinux.lds.h | 6 +++---
2 files changed, 5 insertions(+), 3 deletions(-)

--
Cheers,
Stephen Rothwell


Attachments:
(No filename) (499.00 B)
OpenPGP digital signature

2018-10-12 10:52:24

by Greg KH

[permalink] [raw]
Subject: Re: [GIT PULL] A couple of warning fixes

On Fri, Oct 12, 2018 at 09:12:46AM +1100, Stephen Rothwell wrote:
> Hi Greg,
>
> [Hopefully you and others don't mind fetching these from me directly.]
> [My first pull request, let me know if I did something wrong.]
>
> The following changes since commit 0778a9f2dd924c3af41971ba40eec44793aea531:
>
> Merge branch 'for-4.19-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup (2018-10-11 19:24:01 +0200)
>
> are available in the Git repository at:
>
> git://git.kernel.org/pub/scm/linux/kernel/git/sfr/next-fixes.git tags/next-fixes-20181012

Now merged, thanks.

greg k-h