linux/tools/objtool
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
..
Documentation objtool: Fix up some outdated references to ENTRY/ENDPROC 2025-03-25 09:20:27 +01:00
arch objtool/LoongArch: Mark special atomic instruction as INSN_BUG type 2025-09-18 19:43:36 +08:00
include/objtool objtool: Speed up SHT_GROUP reindexing 2025-05-14 13:09:02 +02:00
.gitignore objtool: Install libsubcmd in build 2023-01-30 16:27:46 -08:00
Build objtool: Install libsubcmd in build 2023-01-30 16:27:46 -08:00
Makefile objtool: Hide unnecessary compiler error message 2025-03-12 15:43:38 -07:00
builtin-check.c objtool: Change "warning:" to "error: " for fatal errors 2025-04-01 09:07:13 +02:00
check.c hardening updates for v6.17-rc1 2025-07-28 17:16:12 -07:00
elf.c objtool: Speed up SHT_GROUP reindexing 2025-05-14 13:09:02 +02:00
noreturns.h objtool: Add vpanic() to the noreturn list 2025-07-11 14:25:21 -04:00
objtool.c objtool: Change "warning:" to "error: " for fatal errors 2025-04-01 09:07:13 +02:00
orc_dump.c objtool: Change "warning:" to "error: " for fatal errors 2025-04-01 09:07:13 +02:00
orc_gen.c objtool/x86: Separate arch-specific and generic parts 2024-03-11 22:23:47 +08:00
special.c objtool: Change "warning:" to "error: " for fatal errors 2025-04-01 09:07:13 +02:00
sync-check.sh objtool: Add objtool_types.h 2023-03-23 23:18:56 +01:00
weak.c objtool: Ditch subcommands 2022-04-22 12:32:01 +02:00