objtool: Fix find_{symbol,func}_containing()
authorPeter Zijlstra <peterz@infradead.org>
Thu, 15 Sep 2022 11:11:12 +0000 (13:11 +0200)
committerPeter Zijlstra <peterz@infradead.org>
Mon, 17 Oct 2022 14:41:08 +0000 (16:41 +0200)
commit5da6aea375cde499fdfac3cde4f26df4a840eb9f
tree0d5cca27775ab8e05b47ad22ded471647ddafa43
parent0c0a6d8934e2081df93ba0bfc0cf615cc9c06988
objtool: Fix find_{symbol,func}_containing()

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
tools/include/linux/interval_tree_generic.h [new file with mode: 0644]
tools/objtool/elf.c
tools/objtool/include/objtool/elf.h