GNU Binutils with patches for OS216
修订版 | 3dd243066bca0093af6a653cc25507596d5ea0b4 (tree) |
---|---|
时间 | 2008-09-08 07:54:54 |
作者 | Dave Anglin <dave.anglin@nrc....> |
Commiter | Dave Anglin |
* 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.
@@ -1,3 +1,10 @@ | ||
1 | +2008-09-07 John David Anglin <dave.anglin@nrc-cnrc.gc.ca> | |
2 | + | |
3 | + * dw2gencfi.c (CFI_DIFF_EXPR_OK): Define if not defined. | |
4 | + (dot_cfi_personality): Use CFI_DIFF_EXPR_OK instead of DIFF_EXPR_OK. | |
5 | + (dot_cfi_lsda, output_cie, output_fde): Likewise. | |
6 | + * config/tc-hppa.h (CFI_DIFF_EXPR_OK): Define. | |
7 | + | |
1 | 8 | 2008-09-06 Richard Sandiford <rdsandiford@googlemail.com> |
2 | 9 | |
3 | 10 | * config/tc-mips.h (DWARF2_FDE_RELOC_SIZE): Define. |
@@ -222,6 +222,10 @@ extern int hppa_regname_to_dw2regnum (char *regname); | ||
222 | 222 | /* Due to the way dynamic linking to personality functions is handled |
223 | 223 | on HP-UX, we need to have a read-write .eh_frame section. */ |
224 | 224 | #define DWARF2_EH_FRAME_READ_ONLY 0 |
225 | + | |
226 | +/* Because differences between text and data symbols don't work, we | |
227 | + can't use difference expressions during CFI generation. */ | |
228 | +#define CFI_DIFF_EXPR_OK 0 | |
225 | 229 | #endif |
226 | 230 | |
227 | 231 | #endif /* OBJ_ELF */ |
@@ -25,6 +25,15 @@ | ||
25 | 25 | |
26 | 26 | #ifdef TARGET_USE_CFIPOP |
27 | 27 | |
28 | +/* By default, use difference expressions if DIFF_EXPR_OK is defined. */ | |
29 | +#ifndef CFI_DIFF_EXPR_OK | |
30 | +# ifdef DIFF_EXPR_OK | |
31 | +# define CFI_DIFF_EXPR_OK 1 | |
32 | +# else | |
33 | +# define CFI_DIFF_EXPR_OK 0 | |
34 | +# endif | |
35 | +#endif | |
36 | + | |
28 | 37 | /* We re-use DWARF2_LINE_MIN_INSN_LENGTH for the code alignment field |
29 | 38 | of the CIE. Default to 1 if not otherwise specified. */ |
30 | 39 | #ifndef DWARF2_LINE_MIN_INSN_LENGTH |
@@ -655,7 +664,7 @@ dot_cfi_personality (int ignored ATTRIBUTE_UNUSED) | ||
655 | 664 | |
656 | 665 | if ((encoding & 0xff) != encoding |
657 | 666 | || ((encoding & 0x70) != 0 |
658 | -#if defined DIFF_EXPR_OK || defined tc_cfi_emit_pcrel_expr | |
667 | +#if CFI_DIFF_EXPR_OK || defined tc_cfi_emit_pcrel_expr | |
659 | 668 | && (encoding & 0x70) != DW_EH_PE_pcrel |
660 | 669 | #endif |
661 | 670 | ) |
@@ -725,7 +734,7 @@ dot_cfi_lsda (int ignored ATTRIBUTE_UNUSED) | ||
725 | 734 | |
726 | 735 | if ((encoding & 0xff) != encoding |
727 | 736 | || ((encoding & 0x70) != 0 |
728 | -#if defined DIFF_EXPR_OK || defined tc_cfi_emit_pcrel_expr | |
737 | +#if CFI_DIFF_EXPR_OK || defined tc_cfi_emit_pcrel_expr | |
729 | 738 | && (encoding & 0x70) != DW_EH_PE_pcrel |
730 | 739 | #endif |
731 | 740 | ) |
@@ -1092,7 +1101,7 @@ output_cie (struct cie_entry *cie) | ||
1092 | 1101 | exp = cie->personality; |
1093 | 1102 | if ((cie->per_encoding & 0x70) == DW_EH_PE_pcrel) |
1094 | 1103 | { |
1095 | -#ifdef DIFF_EXPR_OK | |
1104 | +#if CFI_DIFF_EXPR_OK | |
1096 | 1105 | exp.X_op = O_subtract; |
1097 | 1106 | exp.X_op_symbol = symbol_temp_new_now (); |
1098 | 1107 | emit_expr (&exp, size); |
@@ -1122,7 +1131,7 @@ output_cie (struct cie_entry *cie) | ||
1122 | 1131 | default: |
1123 | 1132 | abort (); |
1124 | 1133 | } |
1125 | -#if defined DIFF_EXPR_OK || defined tc_cfi_emit_pcrel_expr | |
1134 | +#if CFI_DIFF_EXPR_OK || defined tc_cfi_emit_pcrel_expr | |
1126 | 1135 | enc |= DW_EH_PE_pcrel; |
1127 | 1136 | #endif |
1128 | 1137 | out_one (enc); |
@@ -1157,7 +1166,7 @@ output_fde (struct fde_entry *fde, struct cie_entry *cie, | ||
1157 | 1166 | exp.X_op_symbol = cie->start_address; |
1158 | 1167 | emit_expr (&exp, 4); /* CIE offset. */ |
1159 | 1168 | |
1160 | -#ifdef DIFF_EXPR_OK | |
1169 | +#if CFI_DIFF_EXPR_OK | |
1161 | 1170 | exp.X_add_symbol = fde->start_address; |
1162 | 1171 | exp.X_op_symbol = symbol_temp_new_now (); |
1163 | 1172 | emit_expr (&exp, DWARF2_FDE_RELOC_SIZE); /* Code offset. */ |
@@ -1185,7 +1194,7 @@ output_fde (struct fde_entry *fde, struct cie_entry *cie, | ||
1185 | 1194 | exp = fde->lsda; |
1186 | 1195 | if ((fde->lsda_encoding & 0x70) == DW_EH_PE_pcrel) |
1187 | 1196 | { |
1188 | -#ifdef DIFF_EXPR_OK | |
1197 | +#if CFI_DIFF_EXPR_OK | |
1189 | 1198 | exp.X_op = O_subtract; |
1190 | 1199 | exp.X_op_symbol = symbol_temp_new_now (); |
1191 | 1200 | emit_expr (&exp, augmentation_size); |