linux/tools/objtool
Josh Poimboeuf b735bd3e68 objtool: Combine UNWIND_HINT_RET_OFFSET and UNWIND_HINT_FUNC
The ORC metadata generated for UNWIND_HINT_FUNC isn't actually very
func-like.  With certain usages it can cause stack state mismatches
because it doesn't set the return address (CFI_RA).

Also, users of UNWIND_HINT_RET_OFFSET no longer need to set a custom
return stack offset.  Instead they just need to specify a func-like
situation, so the current ret_offset code is hacky for no good reason.

Solve both problems by simplifying the RET_OFFSET handling and
converting it into a more useful UNWIND_HINT_FUNC.

If we end up needing the old 'ret_offset' functionality again in the
future, we should be able to support it pretty easily with the addition
of a custom 'sp_offset' in UNWIND_HINT_FUNC.

Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com>
Link: https://lore.kernel.org/r/db9d1f5d79dddfbb3725ef6d8ec3477ad199948d.1611263462.git.jpoimboe@redhat.com
2021-01-26 11:12:00 -06:00
..
arch/x86 objtool: Combine UNWIND_HINT_RET_OFFSET and UNWIND_HINT_FUNC 2021-01-26 11:12:00 -06:00
Documentation objtool: Support stack layout changes in alternatives 2021-01-14 09:53:54 -06:00
include/objtool objtool: Combine UNWIND_HINT_RET_OFFSET and UNWIND_HINT_FUNC 2021-01-26 11:12:00 -06:00
.gitignore objtool: Rework header include paths 2021-01-13 18:13:14 -06:00
Build objtool: Enable compilation of objtool for all architectures 2020-05-20 09:17:28 -05:00
builtin-check.c objtool: Rework header include paths 2021-01-13 18:13:14 -06:00
builtin-orc.c objtool: Refactor ORC section generation 2021-01-14 09:53:42 -06:00
check.c objtool: Combine UNWIND_HINT_RET_OFFSET and UNWIND_HINT_FUNC 2021-01-26 11:12:00 -06:00
elf.c objtool: Rework header include paths 2021-01-13 18:13:14 -06:00
Makefile objtool: Refactor ORC section generation 2021-01-14 09:53:42 -06:00
objtool.c objtool: Rework header include paths 2021-01-13 18:13:14 -06:00
orc_dump.c objtool: Rework header include paths 2021-01-13 18:13:14 -06:00
orc_gen.c objtool: Support stack layout changes in alternatives 2021-01-14 09:53:54 -06:00
special.c objtool: Rework header include paths 2021-01-13 18:13:14 -06:00
sync-check.sh objtool: Make unwind hint definitions available to other architectures 2020-09-10 10:43:13 -05:00
weak.c objtool: Refactor ORC section generation 2021-01-14 09:53:42 -06:00