summaryrefslogtreecommitdiff
path: root/tools/objtool/include
diff options
context:
space:
mode:
authorPeter Zijlstra <peterz@infradead.org>2022-09-15 14:11:12 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2026-01-11 17:18:17 +0300
commit2de7a0387edd351f2d8689e0b20de0722d520b2d (patch)
tree26cf4e2b5f21a290209562d3cb77ddd108e9873a /tools/objtool/include
parente3596694b1bf014d4c5a761339f5ff075a4d1d24 (diff)
downloadlinux-2de7a0387edd351f2d8689e0b20de0722d520b2d.tar.xz
objtool: Fix find_{symbol,func}_containing()
[ Upstream commit 5da6aea375cde499fdfac3cde4f26df4a840eb9f ] The current find_{symbol,func}_containing() functions are broken in the face of overlapping symbols, exactly the case that is needed for a new ibt/endbr supression. Import interval_tree_generic.h into the tools tree and convert the symbol tree to an interval tree to support proper range stabs. Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Link: https://lore.kernel.org/r/20220915111146.330203761@infradead.org Stable-dep-of: 72567c630d32 ("objtool: Fix weak symbol detection") Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'tools/objtool/include')
-rw-r--r--tools/objtool/include/objtool/elf.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/objtool/include/objtool/elf.h b/tools/objtool/include/objtool/elf.h
index 5d4a841fbd31..fdb6c96aa0a5 100644
--- a/tools/objtool/include/objtool/elf.h
+++ b/tools/objtool/include/objtool/elf.h
@@ -30,7 +30,7 @@ struct section {
struct hlist_node hash;
struct hlist_node name_hash;
GElf_Shdr sh;
- struct rb_root symbol_tree;
+ struct rb_root_cached symbol_tree;
struct list_head symbol_list;
struct list_head reloc_list;
struct section *base, *reloc;
@@ -53,6 +53,7 @@ struct symbol {
unsigned char bind, type;
unsigned long offset;
unsigned int len;
+ unsigned long __subtree_last;
struct symbol *pfunc, *cfunc, *alias;
u8 uaccess_safe : 1;
u8 static_call_tramp : 1;