diff options
author | Tom Rix <trix@redhat.com> | 2002-04-28 14:34:39 +0000 |
---|---|---|
committer | Tom Rix <trix@redhat.com> | 2002-04-28 14:34:39 +0000 |
commit | dbe341c6257a1a598de11c0e6e49c1ee8c59e579 (patch) | |
tree | 1dddc04b7df1978fe811f906913b5923148cdffd /bfd/libxcoff.h | |
parent | 819e64205aa6400c07b6594913a62ab1312f4689 (diff) | |
download | gdb-dbe341c6257a1a598de11c0e6e49c1ee8c59e579.zip gdb-dbe341c6257a1a598de11c0e6e49c1ee8c59e579.tar.gz gdb-dbe341c6257a1a598de11c0e6e49c1ee8c59e579.tar.bz2 |
Rewrite xcoff*_ppc_relocate_section.
Diffstat (limited to 'bfd/libxcoff.h')
-rw-r--r-- | bfd/libxcoff.h | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/bfd/libxcoff.h b/bfd/libxcoff.h index 0cc23d3..5e16fb2 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 */ |