[RFC][PATCH 14/17] objtool: Add comments to the arch_is_$foo() magic symbols

From: Peter Zijlstra
Date: Wed Aug 09 2023 - 03:27:41 EST


Clarification was asked for...

Signed-off-by: Peter Zijlstra (Intel) <peterz@xxxxxxxxxxxxx>
---
tools/objtool/check.c | 12 ++++++++++++
1 file changed, 12 insertions(+)

--- a/tools/objtool/check.c
+++ b/tools/objtool/check.c
@@ -1292,16 +1292,28 @@ static int add_ignore_alternatives(struc
return 0;
}

+/*
+ * Symbols that replace INSN_CALL_DYNAMIC, every (tail) call to such a symbol
+ * will be added to the .retpoline_sites section.
+ */
__weak bool arch_is_retpoline(struct symbol *sym)
{
return false;
}

+/*
+ * Symbols that replace INSN_RETURN, every (tail) call to such a symbol
+ * will be added to the .return_sites section.
+ */
__weak bool arch_is_rethunk(struct symbol *sym)
{
return false;
}

+/*
+ * Symbols that are embedded inside other instructions, because sometimes crazy
+ * code exists. These are mostly ignored for validation purposes.
+ */
__weak bool arch_is_offset_insn(struct symbol *sym)
{
return false;