Re: linux-next: build warnings from the build of Linus' tree
From: Greentime Hu
Date: Tue Aug 28 2018 - 22:12:19 EST
Arnd Bergmann <arnd@xxxxxxxx> æ 2018å8æ24æ éä äå8:48åéï
>
> On Fri, Aug 24, 2018 at 10:23 AM Masami Hiramatsu <mhiramat@xxxxxxxxxx> wrote:
> >
> > On Fri, 24 Aug 2018 13:32:06 +1000
> > Stephen Rothwell <sfr@xxxxxxxxxxxxxxxx> 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