backends: ppc_abi_cfi reg1 use DW_CFA_val_offset not DW_CFA_val_expression.
Register rules using expressions are stored using an offset from the
start of the .eh_frame or .debug_frame ELF section data. Since abi_cfi
rules aren't stored in those ELF sections they should use neither
DW_CFA_expression nor DW_CFA_val_expression. The only backend that used
DW_CFA_val_expression was ppc_cfi.c. It was easier to express the same
rule using DW_CFA_val_offset than to change the code to handle register
rules using expressions. On most architectures this did work by accident.
See the definition of struct dwarf_frame_register value in libdw/cfi.h to
see why. But on ia64 the abi_cfi data and actual frame data were placed
too far apart and caused a crash in tests/run-addrcfi.sh for ppc32.
Signed-off-by: Mark Wielaard <mjw@redhat.com>
diff --git a/libdw/ChangeLog b/libdw/ChangeLog
index e858096..960f5aa 100644
--- a/libdw/ChangeLog
+++ b/libdw/ChangeLog
@@ -1,3 +1,8 @@
+2013-10-06 Mark Wielaard <mjw@redhat.com>
+
+ * cfi.c (execute_cfi): Make sure DW_CFA_expression and
+ DW_CFA_val_expression are not used with abi_cfi.
+
2013-10-03 Josh Stone <jistone@redhat.com>
* dwarf_formref_die.c (dwarf_formref_die): Don't hash the sig8 here.