mirror of
https://github.com/torvalds/linux.git
synced 2024-11-10 14:11:52 +00:00
120dd4118e
GAS <= 2.41 does not support generating R_LARCH_{32,64}_PCREL for
"label - ." and it generates R_LARCH_{ADD,SUB}{32,64} pairs instead.
Objtool cannot handle R_LARCH_{ADD,SUB}{32,64} pair in __jump_table
(static key implementation) and etc. so it will produce some warnings.
This is causing the kernel CI systems to complain everywhere.
For GAS we can check if -mthin-add-sub option is available to know if
R_LARCH_{32,64}_PCREL are supported.
For Clang, we require Clang >= 18 and Clang >= 17 already supports
R_LARCH_{32,64}_PCREL. But unfortunately Clang has some other issues,
so we disable objtool for Clang at present.
Note that __jump_table here is not generated by the compiler, so
-fno-jump-table is completely irrelevant for this issue.
Fixes: cb8a2ef084
("LoongArch: Add ORC stack unwinder support")
Closes: https://lore.kernel.org/loongarch/Zl5m1ZlVmGKitAof@yujie-X299/
Closes: https://lore.kernel.org/loongarch/ZlY1gDDPi_mNrwJ1@slm.duckdns.org/
Closes: https://lore.kernel.org/loongarch/1717478006.038663-1-hengqi@linux.alibaba.com/
Link: https://sourceware.org/git/?p=binutils-gdb.git;a=commitdiff;h=816029e06768
Link: https://github.com/llvm/llvm-project/commit/42cb3c6346fc
Signed-off-by: Xi Ruoyao <xry111@xry111.site>
Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
42 lines
1.4 KiB
Plaintext
42 lines
1.4 KiB
Plaintext
choice
|
|
prompt "Choose kernel unwinder"
|
|
default UNWINDER_PROLOGUE if KALLSYMS
|
|
help
|
|
This determines which method will be used for unwinding kernel stack
|
|
traces for panics, oopses, bugs, warnings, perf, /proc/<pid>/stack,
|
|
lockdep, and more.
|
|
|
|
config UNWINDER_GUESS
|
|
bool "Guess unwinder"
|
|
help
|
|
This option enables the "guess" unwinder for unwinding kernel stack
|
|
traces. It scans the stack and reports every kernel text address it
|
|
finds. Some of the addresses it reports may be incorrect.
|
|
|
|
While this option often produces false positives, it can still be
|
|
useful in many cases.
|
|
|
|
config UNWINDER_PROLOGUE
|
|
bool "Prologue unwinder"
|
|
depends on KALLSYMS
|
|
help
|
|
This option enables the "prologue" unwinder for unwinding kernel stack
|
|
traces. It unwind the stack frame based on prologue code analyze. Symbol
|
|
information is needed, at least the address and length of each function.
|
|
Some of the addresses it reports may be incorrect (but better than the
|
|
Guess unwinder).
|
|
|
|
config UNWINDER_ORC
|
|
bool "ORC unwinder"
|
|
depends on HAVE_OBJTOOL
|
|
select OBJTOOL
|
|
help
|
|
This option enables the ORC (Oops Rewind Capability) unwinder for
|
|
unwinding kernel stack traces. It uses a custom data format which is
|
|
a simplified version of the DWARF Call Frame Information standard.
|
|
|
|
Enabling this option will increase the kernel's runtime memory usage
|
|
by roughly 2-4MB, depending on your kernel config.
|
|
|
|
endchoice
|