diff options
author | Josh Poimboeuf <jpoimboe@kernel.org> | 2023-04-18 14:27:54 -0700 |
---|---|---|
committer | Josh Poimboeuf <jpoimboe@kernel.org> | 2023-05-16 06:31:55 -0700 |
commit | 6245ce4ab670166efcdae843c35c14e4c0811aa3 (patch) | |
tree | da60345ea949fa5900e561160c06776822014b3b /tools/objtool/check.c | |
parent | d59fec29b131f30b27343d54bdf1071ee98eda8e (diff) |
objtool: Move noreturn function list to separate file
This makes it a little cleaner and easier to maintain.
Suggested-by: Peter Zijlstra <peterz@infradead.org>
Reviewed-by: Miroslav Benes <mbenes@suse.cz>
Link: https://lore.kernel.org/r/cecacf07a69a244c74474c18b7652627de67a528.1681853186.git.jpoimboe@kernel.org
Signed-off-by: Josh Poimboeuf <jpoimboe@kernel.org>
Diffstat (limited to 'tools/objtool/check.c')
-rw-r--r-- | tools/objtool/check.c | 44 |
1 files changed, 3 insertions, 41 deletions
diff --git a/tools/objtool/check.c b/tools/objtool/check.c index 8c2762de7ae3..a13c257f80dd 100644 --- a/tools/objtool/check.c +++ b/tools/objtool/check.c @@ -192,49 +192,11 @@ static bool __dead_end_function(struct objtool_file *file, struct symbol *func, struct instruction *insn; bool empty = true; - /* - * Unfortunately these have to be hard coded because the noreturn - * attribute isn't provided in ELF data. Keep 'em sorted. - */ +#define NORETURN(func) __stringify(func), static const char * const global_noreturns[] = { - "__invalid_creds", - "__module_put_and_kthread_exit", - "__reiserfs_panic", - "__stack_chk_fail", - "__ubsan_handle_builtin_unreachable", - "arch_call_rest_init", - "arch_cpu_idle_dead", - "btrfs_assertfail", - "cpu_bringup_and_idle", - "cpu_startup_entry", - "do_exit", - "do_group_exit", - "do_task_dead", - "ex_handler_msr_mce", - "fortify_panic", - "hlt_play_dead", - "hv_ghcb_terminate", - "kthread_complete_and_exit", - "kthread_exit", - "kunit_try_catch_throw", - "machine_real_restart", - "make_task_dead", - "mpt_halt_firmware", - "nmi_panic_self_stop", - "panic", - "panic_smp_self_stop", - "rest_init", - "rewind_stack_and_make_dead", - "sev_es_terminate", - "snp_abort", - "start_kernel", - "stop_this_cpu", - "usercopy_abort", - "x86_64_start_kernel", - "x86_64_start_reservations", - "xen_cpu_bringup_again", - "xen_start_kernel", +#include "noreturns.h" }; +#undef NORETURN if (!func) return false; |