Skip to content

Commit e7e0eb5

Browse files
author
Peter Zijlstra
committed
objtool: Warn about unknown annotation types
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Acked-by: Josh Poimboeuf <jpoimboe@kernel.org> Link: https://lore.kernel.org/r/20241128094312.611961175@infradead.org
1 parent 87116ae commit e7e0eb5

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

tools/objtool/check.c

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2335,6 +2335,10 @@ static int __annotate_ifc(struct objtool_file *file, int type, struct instructio
23352335
static int __annotate_late(struct objtool_file *file, int type, struct instruction *insn)
23362336
{
23372337
switch (type) {
2338+
case ANNOTYPE_NOENDBR:
2339+
/* early */
2340+
break;
2341+
23382342
case ANNOTYPE_RETPOLINE_SAFE:
23392343
if (insn->type != INSN_JUMP_DYNAMIC &&
23402344
insn->type != INSN_CALL_DYNAMIC &&
@@ -2359,11 +2363,20 @@ static int __annotate_late(struct objtool_file *file, int type, struct instructi
23592363
insn->unret = 1;
23602364
break;
23612365

2366+
case ANNOTYPE_IGNORE_ALTS:
2367+
/* early */
2368+
break;
2369+
2370+
case ANNOTYPE_INTRA_FUNCTION_CALL:
2371+
/* ifc */
2372+
break;
2373+
23622374
case ANNOTYPE_REACHABLE:
23632375
insn->dead_end = false;
23642376
break;
23652377

23662378
default:
2379+
WARN_INSN(insn, "Unknown annotation type: %d", type);
23672380
break;
23682381
}
23692382

0 commit comments

Comments
 (0)