[PATCH 5/6] objtool: Skip non-canonical aliased symbols in add_jump_table_alts()

From: Josh Poimboeuf

Date: Thu Nov 20 2025 - 15:52:33 EST


If a symbol has aliases, make add_jump_table_alts() skip the
non-canonical ones to avoid any surprises.

Signed-off-by: Josh Poimboeuf <jpoimboe@xxxxxxxxxx>
---
tools/objtool/check.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/objtool/check.c b/tools/objtool/check.c
index 72c7f6f03350..6a4a29f8f2f5 100644
--- a/tools/objtool/check.c
+++ b/tools/objtool/check.c
@@ -2197,7 +2197,7 @@ static int add_jump_table_alts(struct objtool_file *file)
return 0;

for_each_sym(file->elf, func) {
- if (!is_func_sym(func))
+ if (!is_func_sym(func) || func->alias != func)
continue;

mark_func_jump_tables(file, func);
--
2.51.1