diff options
author | Josh Poimboeuf <jpoimboe@kernel.org> | 2023-04-12 16:49:37 -0700 |
---|---|---|
committer | Peter Zijlstra <peterz@infradead.org> | 2023-04-14 17:31:26 +0200 |
commit | 1c47c8758a11345ac643fa68cb70b708a6668883 (patch) | |
tree | 988c4bd908dde0e3d76bd47c18b73d89ab6f1e92 /README | |
parent | 27dea14c7f05106f39850a9239874cd38703b405 (diff) | |
download | linux-1c47c8758a11345ac643fa68cb70b708a6668883.tar.gz linux-1c47c8758a11345ac643fa68cb70b708a6668883.tar.bz2 linux-1c47c8758a11345ac643fa68cb70b708a6668883.zip |
objtool: Include weak functions in global_noreturns check
If a global function doesn't return, and its prototype has the
__noreturn attribute, its weak counterpart must also not return so that
it matches the prototype and meets call site expectations.
To properly follow the compiled control flow at the call sites, change
the global_noreturns check to include both global and weak functions.
On the other hand, if a weak function isn't in global_noreturns, assume
the prototype doesn't have __noreturn. Even if the weak function
doesn't return, call sites treat it like a returnable function.
Fixes the following warning:
kernel/sched/build_policy.o: warning: objtool: do_idle() falls through to next function play_idle_precise()
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Josh Poimboeuf <jpoimboe@kernel.org>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Reviewed-by: Miroslav Benes <mbenes@suse.cz>
Link: https://lore.kernel.org/r/ede3460d63f4a65d282c86f1175bd2662c2286ba.1681342859.git.jpoimboe@kernel.org
Diffstat (limited to 'README')
0 files changed, 0 insertions, 0 deletions