linux-kernelorg-stable/tools/objtool/arch/loongarch
Tiezhu Yang 539d7344d4 objtool/LoongArch: Mark special atomic instruction as INSN_BUG type
When compiling with LLVM and CONFIG_RUST is set, there exists the
following objtool warning:

  rust/compiler_builtins.o: warning: objtool: __rust__unordsf2(): unexpected end of section .text.unlikely.

objdump shows that the end of section .text.unlikely is an atomic
instruction:

  amswap.w        $zero, $ra, $zero

According to the LoongArch Reference Manual, if the amswap.w atomic
memory access instruction has the same register number as rd and rj,
the execution will trigger an Instruction Non-defined Exception, so
mark the above instruction as INSN_BUG type to fix the warning.

Cc: stable@vger.kernel.org
Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn>
Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
2025-09-18 19:43:36 +08:00
..
include/arch objtool: Handle PC relative relocation type 2025-03-12 15:43:38 -07:00
Build objtool/LoongArch: Enable orc to be built 2024-03-11 22:23:47 +08:00
decode.c objtool/LoongArch: Mark special atomic instruction as INSN_BUG type 2025-09-18 19:43:36 +08:00
orc.c objtool: Change "warning:" to "error: " for fatal errors 2025-04-01 09:07:13 +02:00
special.c objtool/LoongArch: Get table size correctly if LTO is enabled 2025-08-20 22:23:15 +08:00