+2008-09-07 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
+
+ * dw2gencfi.c (CFI_DIFF_EXPR_OK): Define if not defined.
+ (dot_cfi_personality): Use CFI_DIFF_EXPR_OK instead of DIFF_EXPR_OK.
+ (dot_cfi_lsda, output_cie, output_fde): Likewise.
+ * config/tc-hppa.h (CFI_DIFF_EXPR_OK): Define.
+
2008-09-06 Richard Sandiford <rdsandiford@googlemail.com>
* config/tc-mips.h (DWARF2_FDE_RELOC_SIZE): Define.
/* Due to the way dynamic linking to personality functions is handled
on HP-UX, we need to have a read-write .eh_frame section. */
#define DWARF2_EH_FRAME_READ_ONLY 0
+
+/* Because differences between text and data symbols don't work, we
+ can't use difference expressions during CFI generation. */
+#define CFI_DIFF_EXPR_OK 0
#endif
#endif /* OBJ_ELF */
#ifdef TARGET_USE_CFIPOP
+/* By default, use difference expressions if DIFF_EXPR_OK is defined. */
+#ifndef CFI_DIFF_EXPR_OK
+# ifdef DIFF_EXPR_OK
+# define CFI_DIFF_EXPR_OK 1
+# else
+# define CFI_DIFF_EXPR_OK 0
+# endif
+#endif
+
/* We re-use DWARF2_LINE_MIN_INSN_LENGTH for the code alignment field
of the CIE. Default to 1 if not otherwise specified. */
#ifndef DWARF2_LINE_MIN_INSN_LENGTH
if ((encoding & 0xff) != encoding
|| ((encoding & 0x70) != 0
-#if defined DIFF_EXPR_OK || defined tc_cfi_emit_pcrel_expr
+#if CFI_DIFF_EXPR_OK || defined tc_cfi_emit_pcrel_expr
&& (encoding & 0x70) != DW_EH_PE_pcrel
#endif
)
if ((encoding & 0xff) != encoding
|| ((encoding & 0x70) != 0
-#if defined DIFF_EXPR_OK || defined tc_cfi_emit_pcrel_expr
+#if CFI_DIFF_EXPR_OK || defined tc_cfi_emit_pcrel_expr
&& (encoding & 0x70) != DW_EH_PE_pcrel
#endif
)
exp = cie->personality;
if ((cie->per_encoding & 0x70) == DW_EH_PE_pcrel)
{
-#ifdef DIFF_EXPR_OK
+#if CFI_DIFF_EXPR_OK
exp.X_op = O_subtract;
exp.X_op_symbol = symbol_temp_new_now ();
emit_expr (&exp, size);
default:
abort ();
}
-#if defined DIFF_EXPR_OK || defined tc_cfi_emit_pcrel_expr
+#if CFI_DIFF_EXPR_OK || defined tc_cfi_emit_pcrel_expr
enc |= DW_EH_PE_pcrel;
#endif
out_one (enc);
exp.X_op_symbol = cie->start_address;
emit_expr (&exp, 4); /* CIE offset. */
-#ifdef DIFF_EXPR_OK
+#if CFI_DIFF_EXPR_OK
exp.X_add_symbol = fde->start_address;
exp.X_op_symbol = symbol_temp_new_now ();
emit_expr (&exp, DWARF2_FDE_RELOC_SIZE); /* Code offset. */
exp = fde->lsda;
if ((fde->lsda_encoding & 0x70) == DW_EH_PE_pcrel)
{
-#ifdef DIFF_EXPR_OK
+#if CFI_DIFF_EXPR_OK
exp.X_op = O_subtract;
exp.X_op_symbol = symbol_temp_new_now ();
emit_expr (&exp, augmentation_size);