summaryrefslogtreecommitdiff
path: root/tools/objtool/include
diff options
context:
space:
mode:
authorJosh Poimboeuf <jpoimboe@kernel.org>2025-09-17 09:03:39 -0700
committerJosh Poimboeuf <jpoimboe@kernel.org>2025-10-14 14:46:47 -0700
commita1526bcfcb6cb7cb601b9ff8e24d08881ef9afb8 (patch)
tree32d43845f4ee4fafb3e9877cfcdfedf5ef21efac /tools/objtool/include
parentc9e9b85d41f9079d6a10faabf70a0b18d5c0f177 (diff)
objtool: Mark prefix functions
In preparation for the objtool klp diff subcommand, introduce a flag to identify __pfx_*() and __cfi_*() functions in advance so they don't need to be manually identified every time a check is needed. 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.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/tools/objtool/include/objtool/elf.h b/tools/objtool/include/objtool/elf.h
index dbadcc88a3b2..79edf82e76dd 100644
--- a/tools/objtool/include/objtool/elf.h
+++ b/tools/objtool/include/objtool/elf.h
@@ -73,6 +73,7 @@ struct symbol {
u8 ignore : 1;
u8 nocfi : 1;
u8 cold : 1;
+ u8 prefix : 1;
struct list_head pv_target;
struct reloc *relocs;
struct section *group_sec;
@@ -230,6 +231,11 @@ static inline bool is_local_sym(struct symbol *sym)
return sym->bind == STB_LOCAL;
}
+static inline bool is_prefix_func(struct symbol *sym)
+{
+ return sym->prefix;
+}
+
static inline bool is_reloc_sec(struct section *sec)
{
return sec->sh.sh_type == SHT_RELA || sec->sh.sh_type == SHT_REL;