mirror of
https://github.com/torvalds/linux.git
synced 2025-12-07 20:06:24 +00:00
objtool: Fix interval tree insertion for zero-length symbols
Zero-length symbols get inserted in the wrong spot. Fix that. Acked-by: Petr Mladek <pmladek@suse.com> Tested-by: Joe Lawrence <joe.lawrence@redhat.com> Signed-off-by: Josh Poimboeuf <jpoimboe@kernel.org>
This commit is contained in:
@@ -92,7 +92,7 @@ static inline unsigned long __sym_start(struct symbol *s)
|
||||
|
||||
static inline unsigned long __sym_last(struct symbol *s)
|
||||
{
|
||||
return s->offset + s->len - 1;
|
||||
return s->offset + (s->len ? s->len - 1 : 0);
|
||||
}
|
||||
|
||||
INTERVAL_TREE_DEFINE(struct symbol, node, unsigned long, __subtree_last,
|
||||
|
||||
Reference in New Issue
Block a user