Re: [PATCH v5 0/8] Add objtool and orc support for LoongArch

From: Tiezhu Yang
Date: Thu Dec 07 2023 - 02:14:27 EST




On 12/02/2023 09:52 PM, Huacai Chen wrote:
Hi, Tiezhu,

There are still some build warnings.

If FUNCTION_TRACER enabled, we get
AS arch/loongarch/kernel/mcount_dyn.o
arch/loongarch/kernel/mcount_dyn.o: warning: objtool:
ftrace_common+0x0: unreachable instruction
arch/loongarch/kernel/mcount_dyn.o: warning: objtool:
ftrace_caller+0x0: unreachable instruction
arch/loongarch/kernel/mcount_dyn.o: warning: objtool:
ftrace_regs_caller+0x0: unreachable instruction
arch/loongarch/kernel/mcount_dyn.o: warning: objtool:
ftrace_graph_caller+0x0: unreachable instruction
arch/loongarch/kernel/mcount_dyn.o: warning: objtool:
return_to_handler+0x0: unreachable instruction
arch/loongarch/kernel/mcount_dyn.o: warning: objtool:
ftrace_stub_direct_tramp+0x0: unreachable instruction

AS arch/loongarch/kernel/rethook_trampoline.o
arch/loongarch/kernel/rethook_trampoline.o: warning: objtool:
arch_rethook_trampoline+0x0: unreachable instruction

I tested with the default config loongson3_defconfig,
the FUNCTION_TRACE is not enabled, let me try to fix it.

And when I use the latest binutils/gcc for native build, there are
some warnings in some files from the {init, kernel} directory. But
cross-building is fine, I don't know why.

I can not reproduce it for native build, it works well,
I will analysis if it can reproduce someday.

Thanks,
Tiezhu