linux-yocto/tools/objtool
Tiezhu Yang b6f29fa5f6 objtool/LoongArch: Mark special atomic instruction as INSN_BUG type
commit 539d7344d4feaea37e05863e9aa86bd31f28e46f upstream.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-09-25 11:13:45 +02:00
..
arch objtool/LoongArch: Mark special atomic instruction as INSN_BUG type 2025-09-25 11:13:45 +02:00
Documentation x86/alternatives, kvm: Fix a couple of CALLs without a frame pointer 2024-07-01 12:41:11 +02:00
include/objtool objtool: Fix C jump table annotations for Clang 2025-03-07 18:25:36 +01:00
.gitignore
Build
builtin-check.c objtool: Use "action" in error message to be consistent with help 2024-07-02 23:40:24 -07:00
check.c objtool/rust: add one more noreturn Rust function for Rust 1.89.0 2025-07-24 08:56:22 +02:00
elf.c
Makefile objtool/LoongArch: Enable orc to be built 2024-03-11 22:23:47 +08:00
noreturns.h objtool: Add bch2_trans_unlocked_error() to bcachefs noreturns 2025-01-02 10:34:21 +01:00
objtool.c
orc_dump.c objtool/x86: Separate arch-specific and generic parts 2024-03-11 22:23:47 +08:00
orc_gen.c objtool/x86: Separate arch-specific and generic parts 2024-03-11 22:23:47 +08:00
special.c x86/alternatives: Add nested alternatives macros 2024-06-11 17:13:08 +02:00
sync-check.sh
weak.c