]> git.ipfire.org Git - thirdparty/elfutils.git/commit
libdw,readelf: Recognize DW_CFA_AARCH64_negate_ra_state
authorMark Wielaard <mark@klomp.org>
Thu, 3 Sep 2020 15:46:53 +0000 (17:46 +0200)
committerMark Wielaard <mark@klomp.org>
Mon, 7 Sep 2020 10:21:10 +0000 (12:21 +0200)
commit5ed73d79bf5670484963cb5b57b8da50c68d5c3e
tree2253b44f8322d2520ccd3538d832f97aecc1bb26
parent18d64cd8e7ce0761568631bb40136ca7a154b6e0
libdw,readelf: Recognize DW_CFA_AARCH64_negate_ra_state

DW_CFA_AARCH64_negate_ra_state is used on aarch64 to indicate whether
or not the return address is mangled or not. This has the same value
as the DW_CFA_GNU_window_save. So we have to pass around the e_machine
value of the process or core we are inspecting to know which one to
use.

Note that it isn't actually implemented yet. It needs ARMv8.3 hardware.
If we don't have such hardware it is enough to simply ignore the
DW_CFA_AARCH64_negate_ra_state (and not confuse it with
DW_CFA_GNU_window_save) to get backtraces to work on aarch64.

Add a testcase for eu-readelf --debug-dump=frames to show the value
is correctly recognized. Also don't warn we cannot find any DWARF
if we are just dumping frames (those will come from .eh_frame if
there is no .debug_frame).

Signed-off-by: Mark Wielaard <mark@klomp.org>
libdw/ChangeLog
libdw/cfi.c
libdw/cfi.h
libdw/dwarf.h
libdw/dwarf_getcfi.c
libdw/dwarf_getcfi_elf.c
src/ChangeLog
src/readelf.c
tests/ChangeLog
tests/Makefile.am
tests/run-readelf-frames.sh [new file with mode: 0755]