Thread (37 messages) flat view 37 messages, 2 authors, 23h ago
HOTtoday REVIEWED: 3 (3M)

Revision v4 of 2 in this series; 1 review trailer.

Revisions (2)
  1. v3 [diff vs current]
  2. v4 current

[PATCH v4 17/22] objtool/klp: Filter arm64 mapping symbols in find_symbol_by_offset()

From: Josh Poimboeuf <jpoimboe@kernel.org>
Date: 2026-08-08 23:19:00
Also in: live-patching, lkml
Subsystem: objtool, the rest · Maintainers: Josh Poimboeuf, Peter Zijlstra, Linus Torvalds

ARM64 ELF objects contain $d/$x mapping symbols (STT_NOTYPE) at offset 0
in data/text sections.  These aren't "real" symbols so filter them from
find_symbol_by_offset(), consistent with the existing section symbol
filter.

Acked-by: Song Liu <song@kernel.org>
Signed-off-by: Josh Poimboeuf <jpoimboe@kernel.org>
---
 tools/objtool/elf.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/objtool/elf.c b/tools/objtool/elf.c
index 180e0a0da00ff..f9d49325dbe0d 100644
--- a/tools/objtool/elf.c
+++ b/tools/objtool/elf.c
@@ -160,7 +160,7 @@ struct symbol *find_symbol_by_offset(struct section *sec, unsigned long offset)
 	struct symbol *sym;
 
 	__sym_for_each(sym, tree, offset, offset) {
-		if (sym->offset == offset && !is_sec_sym(sym))
+		if (sym->offset == offset && !is_sec_sym(sym) && !is_mapping_sym(sym))
 			return sym->alias;
 	}
 
-- 
2.54.0

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help