objtool: Fix the check for dead_end function with multiple sibling calls
PATCH v3 1/2 objtool: Fix the check for dead_end function with multiple sibling calls
From: Rong Xu <[email protected]>
If a function has multiple sibling calls, the dead_end check should only return true if all sibling call targets are also dead_end functions.
Signed-off-by Rong Xu <[email protected]>
Reviewed-by Sriraman Tallam <[email protected]>
Reviewed-by Han Shen <[email protected]>
Reviewed-by Krzysztof Pszeniczny <[email protected]>
Acked-by Josh Poimboeuf <[email protected]>
ChangedLog:
v3: Fix the typos in the commit message. (From Josh Poimboeuf).
Drop the other patch (split funciton) as Josh has a better fix. Add Acked-by from Josh.
--- tools/objtool/check.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)
tools/objtool/check.c +7 -1
@@ -314,7 +314,13 @@ static bool __dead_end_function(struct objtool_file *file, struct symbol *func,return false; } -return __dead_end_function (file,insn_func (dest), recursion+1 ); +/* +* A function can have multiple sibling calls. All of +* them need to be dead ends for the function to be a +* dead end too. +*/ +if (!__dead_end_function (file,insn_func (dest), recursion+1 )) +return false; } }
base-commit: 8b690556d8fe074b4f9835075050fba3fb180e93
Signature · 1 line
2.52.0.rc1.455.g30608eb744-goog