summaryrefslogtreecommitdiff
path: root/tools/objtool/check.c
diff options
context:
space:
mode:
authorWentong Tian <tianwentong2000@gmail.com>2026-01-22 17:44:04 +0300
committerJosh Poimboeuf <jpoimboe@kernel.org>2026-03-06 19:08:19 +0300
commitc19c854b307424c745dd6de73eea8db099c79408 (patch)
tree961e62a38896a8e7c7ee7812d13555946468ff95 /tools/objtool/check.c
parent11439c4635edd669ae435eec308f4ab8a0804808 (diff)
downloadlinux-c19c854b307424c745dd6de73eea8db099c79408.tar.xz
objtool: Use section/symbol type helpers
Commit 25eac74b6bdb ("objtool: Add section/symbol type helpers") introduced several helper macros to improve code readability. Update the remaining open-coded checks in check.c, disas.c, elf.c, and klp-diff.c to use these new helpers. Signed-off-by: Wentong Tian <tianwentong2000@gmail.com> Link: https://patch.msgid.link/20260122144404.40602-1-tianwentong2000@gmail.com Signed-off-by: Josh Poimboeuf <jpoimboe@kernel.org>
Diffstat (limited to 'tools/objtool/check.c')
-rw-r--r--tools/objtool/check.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/objtool/check.c b/tools/objtool/check.c
index a30379e4ff97..efd4b9ce0560 100644
--- a/tools/objtool/check.c
+++ b/tools/objtool/check.c
@@ -4293,8 +4293,8 @@ static int validate_retpoline(struct objtool_file *file)
list_for_each_entry(insn, &file->retpoline_call_list, call_node) {
struct symbol *sym = insn->sym;
- if (sym && (sym->type == STT_NOTYPE ||
- sym->type == STT_FUNC) && !sym->nocfi) {
+ if (sym && (is_notype_sym(sym) ||
+ is_func_sym(sym)) && !sym->nocfi) {
struct instruction *prev =
prev_insn_same_sym(file, insn);