summaryrefslogtreecommitdiff
path: root/bfd/libxcoff.h
diff options
context:
space:
mode:
authorTom Rix <trix@redhat.com>2002-04-28 14:34:39 +0000
committerTom Rix <trix@redhat.com>2002-04-28 14:34:39 +0000
commitf2f52914c4942d3d71029101ae82a05779dd64a5 (patch)
tree4a507d856de085833889383df7d4206071372074 /bfd/libxcoff.h
parente92c2ac0a726df7dd58d5208f644f20b9b8e971e (diff)
downloadgdb-f2f52914c4942d3d71029101ae82a05779dd64a5.tar.gz
Rewrite xcoff*_ppc_relocate_section.
Diffstat (limited to 'bfd/libxcoff.h')
-rw-r--r--bfd/libxcoff.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/bfd/libxcoff.h b/bfd/libxcoff.h
index 0cc23d3997d..5e16fb2b601 100644
--- a/bfd/libxcoff.h
+++ b/bfd/libxcoff.h
@@ -200,4 +200,26 @@ struct xcoff_backend_data_rec
#define bfd_xcoff_text_align_power(a) ((xcoff_data (a)->text_align_power))
#define bfd_xcoff_data_align_power(a) ((xcoff_data (a)->data_align_power))
+/* xcoff*_ppc_relocate_section macros */
+#define XCOFF_MAX_CALCULATE_RELOCATION (0x1c)
+#define XCOFF_MAX_COMPLAIN_OVERFLOW (4)
+/* N_ONES produces N one bits, without overflowing machine arithmetic. */
+#ifdef N_ONES
+#undef N_ONES
+#endif
+#define N_ONES(n) (((((bfd_vma) 1 << ((n) - 1)) - 1) << 1) | 1)
+
+#define XCOFF_RELOC_FUNCTION_ARGS \
+ bfd *, asection *, bfd *, struct internal_reloc *, \
+ struct internal_syment *, struct reloc_howto_struct *, bfd_vma, bfd_vma, \
+ bfd_vma *relocation, bfd_byte *contents
+
+#define XCOFF_COMPLAIN_FUNCTION_ARGS \
+ bfd *, bfd_vma, bfd_vma, struct reloc_howto_struct *howto
+
+extern boolean (*xcoff_calculate_relocation[XCOFF_MAX_CALCULATE_RELOCATION])
+ (XCOFF_RELOC_FUNCTION_ARGS);
+extern boolean (*xcoff_complain_overflow[XCOFF_MAX_COMPLAIN_OVERFLOW])
+ (XCOFF_COMPLAIN_FUNCTION_ARGS);
+
#endif /* LIBXCOFF_H */