]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blobdiff - bfd/libxcoff.h
Update year range in copyright notice of binutils files
[thirdparty/binutils-gdb.git] / bfd / libxcoff.h
index 7a06a0f0e0b40d51439d23b67d917de0657e2650..e96f53260ef7147252444cd5f11e777f56af7465 100644 (file)
@@ -1,5 +1,5 @@
 /* BFD XCOFF object file private structure.
-   Copyright (C) 2001-2017 Free Software Foundation, Inc.
+   Copyright (C) 2001-2021 Free Software Foundation, Inc.
    Written by Tom Rix, Redhat.
 
    This file is part of BFD, the Binary File Descriptor library.
@@ -90,7 +90,7 @@ struct xcoff_backend_data_rec
 
   /* Global linkage.  The first word of global linkage code must be be
      modified by filling in the correct TOC offset.  */
-  unsigned long *_xcoff_glink_code;
+  const unsigned long *_xcoff_glink_code;
 
   /* Size of the global link code in bytes of the xcoff_glink_code table.  */
   unsigned long _xcoff_glink_size;
@@ -194,7 +194,7 @@ struct xcoff_backend_data_rec
 /* Check for the magic number U802TOMAGIC for 32 bit targets.  */
 #define bfd_xcoff_is_xcoff32(a) (0x01DF == (bfd_xcoff_magic_number (a)))
 
-#define bfd_xcoff_rtinit_size(a)              ((xcoff_backend (a)->_xcoff_rtinit_size))
+#define bfd_xcoff_rtinit_size(a)             ((xcoff_backend (a)->_xcoff_rtinit_size))
 #define bfd_xcoff_generate_rtinit(a, b, c, d) ((xcoff_backend (a)->_xcoff_generate_rtinit ((a), (b), (c), (d))))
 
 /* Accessor macros for tdata.  */
@@ -210,30 +210,30 @@ struct xcoff_backend_data_rec
 #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
+typedef bfd_boolean xcoff_reloc_function (bfd *, asection *, bfd *,
+                                         struct internal_reloc *,
+                                         struct internal_syment *,
+                                         struct reloc_howto_struct *,
+                                         bfd_vma, bfd_vma,
+                                         bfd_vma *, bfd_byte *);
 
-#define XCOFF_COMPLAIN_FUNCTION_ARGS \
-  bfd *, bfd_vma, bfd_vma, struct reloc_howto_struct *howto
+typedef bfd_boolean xcoff_complain_function (bfd *, bfd_vma, bfd_vma,
+                                            struct reloc_howto_struct *);
 
-extern bfd_boolean (*xcoff_calculate_relocation[XCOFF_MAX_CALCULATE_RELOCATION])
-  (XCOFF_RELOC_FUNCTION_ARGS);
-extern bfd_boolean (*xcoff_complain_overflow[XCOFF_MAX_COMPLAIN_OVERFLOW])
-  (XCOFF_COMPLAIN_FUNCTION_ARGS);
+extern xcoff_reloc_function *const xcoff_calculate_relocation[];
+extern xcoff_complain_function *const xcoff_complain_overflow[];
 
 #define XCOFF_NO_LONG_SECTION_NAMES  (FALSE), bfd_coff_set_long_section_names_disallowed
 
 /* Relocation functions */
-bfd_boolean xcoff_reloc_type_noop (XCOFF_RELOC_FUNCTION_ARGS);
-bfd_boolean xcoff_reloc_type_fail (XCOFF_RELOC_FUNCTION_ARGS);
-bfd_boolean xcoff_reloc_type_pos  (XCOFF_RELOC_FUNCTION_ARGS);
-bfd_boolean xcoff_reloc_type_neg  (XCOFF_RELOC_FUNCTION_ARGS);
-bfd_boolean xcoff_reloc_type_rel  (XCOFF_RELOC_FUNCTION_ARGS);
-bfd_boolean xcoff_reloc_type_toc  (XCOFF_RELOC_FUNCTION_ARGS);
-bfd_boolean xcoff_reloc_type_ba   (XCOFF_RELOC_FUNCTION_ARGS);
-bfd_boolean xcoff_reloc_type_crel (XCOFF_RELOC_FUNCTION_ARGS);
+extern xcoff_reloc_function xcoff_reloc_type_noop;
+extern xcoff_reloc_function xcoff_reloc_type_fail;
+extern xcoff_reloc_function xcoff_reloc_type_pos;
+extern xcoff_reloc_function xcoff_reloc_type_neg;
+extern xcoff_reloc_function xcoff_reloc_type_rel;
+extern xcoff_reloc_function xcoff_reloc_type_toc;
+extern xcoff_reloc_function xcoff_reloc_type_ba;
+extern xcoff_reloc_function xcoff_reloc_type_crel;
 
 /* Structure to describe dwarf sections.
    Useful to convert from XCOFF section name to flag and vice-versa.