projects
/
linux-2.6-microblaze.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2c2acca
)
objtool: Don't alias undefined symbols
author
Josh Poimboeuf
<jpoimboe@kernel.org>
Thu, 20 Nov 2025 20:52:17 +0000
(12:52 -0800)
committer
Peter Zijlstra
<peterz@infradead.org>
Fri, 21 Nov 2025 09:04:08 +0000
(10:04 +0100)
Objtool is mistakenly aliasing all undefined symbols. That's obviously
wrong, though it has no consequence since objtool happens to only use
sym->alias for defined symbols. Fix it regardless.
Signed-off-by: Josh Poimboeuf <jpoimboe@kernel.org>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link:
https://patch.msgid.link/bc401173a7717757eee672fc1ca5a20451d77b86.1763671318.git.jpoimboe@kernel.org
tools/objtool/elf.c
patch
|
blob
|
history
diff --git
a/tools/objtool/elf.c
b/tools/objtool/elf.c
index
fffca31
..
4f15643
100644
(file)
--- a/
tools/objtool/elf.c
+++ b/
tools/objtool/elf.c
@@
-492,8
+492,8
@@
static int elf_add_symbol(struct elf *elf, struct symbol *sym)
sym->len = sym->sym.st_size;
__sym_for_each(iter, &sym->sec->symbol_tree, sym->offset, sym->offset) {
- if (
iter->offset == sym->offset && iter->type == sym->type
&&
- iter->len == sym->len)
+ if (
!is_undef_sym(iter) && iter->offset == sym->offset
&&
+ iter->
type == sym->type && iter->
len == sym->len)
iter->alias = sym;
}