aboutsummaryrefslogtreecommitdiff
path: root/gas/config
diff options
context:
space:
mode:
authorRichard Henderson <rth@redhat.com>2008-08-21 19:49:22 +0000
committerRichard Henderson <rth@redhat.com>2008-08-21 19:49:22 +0000
commit8c9b70b1a5d4a033ce38d16981b31a1e2f67485d (patch)
treefa25136b95953f8456338d2753f3e5f9313b9ebb /gas/config
parentaa8d5e4592d560eb7b1dd04ed8d9254b43d6f929 (diff)
downloadfsf-binutils-gdb-8c9b70b1a5d4a033ce38d16981b31a1e2f67485d.zip
fsf-binutils-gdb-8c9b70b1a5d4a033ce38d16981b31a1e2f67485d.tar.gz
fsf-binutils-gdb-8c9b70b1a5d4a033ce38d16981b31a1e2f67485d.tar.bz2
* dw2gencfi.c (DWARF2_FDE_RELOC_SIZE): New.
(output_cie, output_fde): Use it. (DWARF2_EH_FRAME_READ_ONLY): New. (cfi_finish): Use it. * config/tc-hppa.h (DWARF2_FDE_RELOC_SIZE): Set to 8 for 64-bit. (DWARF2_CIE_DATA_ALIGNMENT): Change sign. (DWARF2_EH_FRAME_READ_ONLY): New. * config/tc-hppa.c (tc_gen_reloc): Generate pc-relative relocations from the results of DIFF_EXPR_OK manipulation.
Diffstat (limited to 'gas/config')
-rw-r--r--gas/config/tc-hppa.c12
-rw-r--r--gas/config/tc-hppa.h12
2 files changed, 20 insertions, 4 deletions
diff --git a/gas/config/tc-hppa.c b/gas/config/tc-hppa.c
index d31d527..f36ac2b 100644
--- a/gas/config/tc-hppa.c
+++ b/gas/config/tc-hppa.c
@@ -1375,6 +1375,18 @@ tc_gen_reloc (asection *section, fixS *fixp)
reloc->sym_ptr_ptr = xmalloc (sizeof (asymbol *));
*reloc->sym_ptr_ptr = symbol_get_bfdsym (fixp->fx_addsy);
+
+ /* Allow fixup_segment to recognize hand-written pc-relative relocations.
+ When we went through cons_fix_new_hppa, we classified them as complex. */
+ /* ??? It might be better to hide this +8 stuff in tc_cfi_emit_pcrel_expr,
+ undefine DIFF_EXPR_OK, and let these sorts of complex expressions fail
+ when R_HPPA_COMPLEX == R_PARISC_UNIMPLEMENTED. */
+ if (fixp->fx_r_type == R_HPPA_COMPLEX && fixp->fx_pcrel)
+ {
+ fixp->fx_r_type = R_HPPA_PCREL_CALL;
+ fixp->fx_offset += 8;
+ }
+
codes = hppa_gen_reloc_type (stdoutput,
fixp->fx_r_type,
hppa_fixp->fx_r_format,
diff --git a/gas/config/tc-hppa.h b/gas/config/tc-hppa.h
index bf5b27f..b53527b 100644
--- a/gas/config/tc-hppa.h
+++ b/gas/config/tc-hppa.h
@@ -186,8 +186,6 @@ int hppa_fix_adjustable (struct fix *);
#define elf_tc_final_processing elf_hppa_final_processing
void elf_hppa_final_processing (void);
-
-#define DWARF2_LINE_MIN_INSN_LENGTH 4
#endif /* OBJ_ELF */
#define md_operand(x)
@@ -213,10 +211,16 @@ extern int hppa_regname_to_dw2regnum (char *regname);
#define DWARF2_LINE_MIN_INSN_LENGTH 4
#define DWARF2_DEFAULT_RETURN_COLUMN 2
#if TARGET_ARCH_SIZE == 64
-#define DWARF2_CIE_DATA_ALIGNMENT (-8)
+#define DWARF2_CIE_DATA_ALIGNMENT 8
+#define DWARF2_FDE_RELOC_SIZE 8
#else
-#define DWARF2_CIE_DATA_ALIGNMENT (-4)
+#define DWARF2_CIE_DATA_ALIGNMENT 4
#endif
+
+/* Due to the way dynamic linking to personality functions is handled,
+ we need to have a read-write .eh_frame section. */
+#define DWARF2_EH_FRAME_READ_ONLY 0
+
#endif
#endif /* _TC_HPPA_H */