From 6282e9f46b4fa3ac554852bb1aef17843fc47ee2 Mon Sep 17 00:00:00 2001 From: Josh Poimboeuf Date: Wed, 18 Mar 2026 15:33:58 -0700 Subject: objtool: Add is_cold_func() helper Add an is_cold_func() helper. No functional changes intended. Acked-by: Song Liu Signed-off-by: Josh Poimboeuf --- tools/objtool/include/objtool/elf.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'tools/objtool/include') diff --git a/tools/objtool/include/objtool/elf.h b/tools/objtool/include/objtool/elf.h index ccc72a692d9a..e452784df702 100644 --- a/tools/objtool/include/objtool/elf.h +++ b/tools/objtool/include/objtool/elf.h @@ -308,6 +308,11 @@ static inline bool is_prefix_func(struct symbol *sym) return sym->prefix; } +static inline bool is_cold_func(struct symbol *sym) +{ + return sym->cold; +} + static inline bool is_reloc_sec(struct section *sec) { return sec->sh.sh_type == SHT_RELA || sec->sh.sh_type == SHT_REL; -- cgit v1.2.3