diff options
author | Mark Wielaard <mark@klomp.org> | 2018-04-11 10:37:45 +0200 |
---|---|---|
committer | Mark Wielaard <mark@klomp.org> | 2018-04-13 13:37:16 +0200 |
commit | f881459ffc95b6fad51aa055a158ee14814073aa (patch) | |
tree | 18814c7b080fce0d3f534280f586b91675a4afa2 /backends | |
parent | 1cc2e2265df8b0f7d97d3680e9e35124ad92a4f5 (diff) | |
download | elfutils-f881459ffc95b6fad51aa055a158ee14814073aa.tar.gz |
aarch64: Add default cfi rule to restore SP from CFA address.
The CFA is set by default to the stack pointer of the previous frame.
So that is also how we can always restore the SP. This default aarch64
CFI rule is necessary on Fedora 28 with GCC8 to make the run-deleted.sh
and run-backtrace-dwarf.sh testcases work.
Signed-off-by: Mark Wielaard <mark@klomp.org>
Diffstat (limited to 'backends')
-rw-r--r-- | backends/ChangeLog | 5 | ||||
-rw-r--r-- | backends/aarch64_cfi.c | 7 |
2 files changed, 10 insertions, 2 deletions
diff --git a/backends/ChangeLog b/backends/ChangeLog index b5258013..57baea09 100644 --- a/backends/ChangeLog +++ b/backends/ChangeLog @@ -1,3 +1,8 @@ +2018-04-11 Mark Wielaard <mark@klomp.org> + + * aarch64_cfi.c (aarch64_abi_cfi): Add rule for restoring SP from + CFA address. + 2018-02-15 Mark Wielaard <mark@klomp.org> * ppc_initreg.c: Include ptrace.h before system.h and sys/user.h. diff --git a/backends/aarch64_cfi.c b/backends/aarch64_cfi.c index acbb9b69..a5579ab1 100644 --- a/backends/aarch64_cfi.c +++ b/backends/aarch64_cfi.c @@ -1,5 +1,5 @@ -/* arm ABI-specified defaults for DWARF CFI. - Copyright (C) 2013 Red Hat, Inc. +/* arm64 ABI-specified defaults for DWARF CFI. + Copyright (C) 2013, 2018 Red Hat, Inc. This file is part of elfutils. This file is free software; you can redistribute it and/or modify @@ -62,6 +62,9 @@ aarch64_abi_cfi (Ebl *ebl __attribute__ ((unused)), Dwarf_CIE *abi_info) /* The Frame Pointer (FP, r29) and Link Register (LR, r30). */ SV (29), SV (30), + /* The Stack Pointer (r31) is restored from CFA address by default. */ + DW_CFA_val_offset, ULEB128_7 (31), ULEB128_7 (0), + /* Callee-saved fpregs v8-v15. v0 == 64. */ SV (72), SV (73), SV (74), SV (75), SV (76), SV (77), SV (78), SV (79), |