summaryrefslogtreecommitdiff
path: root/tools/objtool/include
diff options
context:
space:
mode:
authorJosh Poimboeuf <jpoimboe@kernel.org>2025-09-17 09:03:45 -0700
committerJosh Poimboeuf <jpoimboe@kernel.org>2025-10-14 14:46:48 -0700
commita05de0a772ce423895a3b07504a9ed93ae75e912 (patch)
tree4b5ce5516e42353fecb5617888baf74ba7e1fa45 /tools/objtool/include
parent935c0b6a059106c09bf5cdb70f42c1a8650843af (diff)
objtool: Refactor add_jump_destinations()
The add_jump_destinations() logic is a bit weird and convoluted after being incrementally tweaked over the years. Refactor it to hopefully be more logical and straightforward. Acked-by: Petr Mladek <pmladek@suse.com> Tested-by: Joe Lawrence <joe.lawrence@redhat.com> Signed-off-by: Josh Poimboeuf <jpoimboe@kernel.org>
Diffstat (limited to 'tools/objtool/include')
-rw-r--r--tools/objtool/include/objtool/elf.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/objtool/include/objtool/elf.h b/tools/objtool/include/objtool/elf.h
index 79edf82e76dd..07fc41f574b9 100644
--- a/tools/objtool/include/objtool/elf.h
+++ b/tools/objtool/include/objtool/elf.h
@@ -181,9 +181,9 @@ static inline unsigned int elf_text_rela_type(struct elf *elf)
return elf_addr_size(elf) == 4 ? R_TEXT32 : R_TEXT64;
}
-static inline bool sym_has_sec(struct symbol *sym)
+static inline bool is_undef_sym(struct symbol *sym)
{
- return sym->sec->idx;
+ return !sym->sec->idx;
}
static inline bool is_null_sym(struct symbol *sym)