[PATCH v3 16/21] objtool/klp: Filter arm64 mapping symbols in find_symbol_by_offset()
Josh Poimboeuf <[email protected]>
| Newsgroups | org.kernel.vger.live-patching,org.infradead.lists.linux-arm-kernel,org.kernel.vger.linux-kernel |
|---|---|
| Message-ID | <20260513033412.8X4ZWEOluxGi46RzaDkLq6G-PYNgy0PVZbISsWArpvE@z> |
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. Signed-off-by: Josh Poimboeuf <[email protected]> --- 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 9d5a926934dc2..a4d9afa3a079c 100644 --- a/tools/objtool/elf.c +++ b/tools/objtool/elf.c @@ -159,7 +159,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.53.0