* bfd.c (bfd_archive_filename): New function.
[deliverable/binutils-gdb.git] / bfd / bfd-in2.h
index 5d139db494675891d50611b1007f643b4890bccc..0b5584de09225fe241f095968301819c0605b5b9 100644 (file)
@@ -1,5 +1,6 @@
 /* Main header file for the bfd library -- portable access to object files.
-   Copyright 1990, 91, 92, 93, 94, 95, 96, 97, 98, 99, 2000
+   Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
+   2000, 2001
    Free Software Foundation, Inc.
    Contributed by Cygnus Support.
 
@@ -51,9 +52,16 @@ extern "C" {
 
 #include "ansidecl.h"
 
-/* These two lines get substitutions done by commands in Makefile.in.  */
 #define BFD_VERSION  "@VERSION@"
+
+/* The word size used by BFD on the host.  This may be 64 with a 32
+   bit target if the host is 64 bit, or if other 64 bit targets have
+   been selected with --enable-targets, or if --enable-64-bit-bfd.  */
 #define BFD_ARCH_SIZE @wordsize@
+
+/* The word size of the default bfd target.  */
+#define BFD_DEFAULT_TARGET_SIZE @bfd_default_target_size@
+
 #define BFD_HOST_64BIT_LONG @BFD_HOST_64BIT_LONG@
 #if @BFD_HOST_64_BIT_DEFINED@
 #define BFD_HOST_64_BIT @BFD_HOST_64_BIT@
@@ -84,7 +92,7 @@ typedef struct _bfd bfd;
 /* General rules: functions which are boolean return true on success
    and false on failure (unless they're a predicate).   -- bfd.doc */
 /* I'm sure this is going to break something and someone is going to
-   force me to change it. */
+   force me to change it.  */
 /* typedef enum boolean {false, true} boolean; */
 /* Yup, SVR4 has a "typedef enum boolean" in <sys/types.h>  -fnf */
 /* It gets worse if the host also defines a true/false enum... -sts */
@@ -93,7 +101,7 @@ typedef struct _bfd bfd;
 #define TRUE_FALSE_ALREADY_DEFINED
 #endif
 #ifdef MPW
-/* Pre-emptive strike - get the file with the enum. */
+/* Pre-emptive strike - get the file with the enum.  */
 #include <Types.h>
 #define TRUE_FALSE_ALREADY_DEFINED
 #endif /* MPW */
@@ -105,16 +113,6 @@ typedef enum bfd_boolean {false, true} boolean;
 typedef enum bfd_boolean {bfd_fffalse, bfd_tttrue} boolean;
 #endif
 
-/* A pointer to a position in a file.  */
-/* FIXME:  This should be using off_t from <sys/types.h>.
-   For now, try to avoid breaking stuff by not including <sys/types.h> here.
-   This will break on systems with 64-bit file offsets (e.g. 4.4BSD).
-   Probably the best long-term answer is to avoid using file_ptr AND off_t
-   in this header file, and to handle this in the BFD implementation
-   rather than in its interface.  */
-/* typedef off_t       file_ptr; */
-typedef long int file_ptr;
-
 /* Support for different sizes of target format ints and addresses.
    If the type `long' is at least 64 bits, BFD_HOST_64BIT_LONG will be
    set to 1 above.  Otherwise, if gcc is being used, this code will
@@ -177,12 +175,27 @@ typedef unsigned long symvalue;
 typedef unsigned long bfd_size_type;
 
 /* Print a bfd_vma x on stream s.  */
-#define fprintf_vma(s,x) fprintf(s, "%08lx", x)
-#define sprintf_vma(s,x) sprintf(s, "%08lx", x)
+#define fprintf_vma(s,x) fprintf (s, "%08lx", x)
+#define sprintf_vma(s,x) sprintf (s, "%08lx", x)
 
 #endif /* not BFD64  */
 
+/* A pointer to a position in a file.  */
+/* FIXME:  This should be using off_t from <sys/types.h>.
+   For now, try to avoid breaking stuff by not including <sys/types.h> here.
+   This will break on systems with 64-bit file offsets (e.g. 4.4BSD).
+   Probably the best long-term answer is to avoid using file_ptr AND off_t
+   in this header file, and to handle this in the BFD implementation
+   rather than in its interface.  */
+/* typedef off_t       file_ptr; */
+typedef bfd_signed_vma file_ptr;
+typedef bfd_vma ufile_ptr;
+
+extern void bfd_sprintf_vma PARAMS ((bfd *, char *, bfd_vma));
+extern void bfd_fprintf_vma PARAMS ((bfd *, PTR, bfd_vma));
+
 #define printf_vma(x) fprintf_vma(stdout,x)
+#define bfd_printf_vma(abfd,x) bfd_fprintf_vma (abfd,stdout,x)
 
 typedef unsigned int flagword; /* 32 bits of flags */
 typedef unsigned char bfd_byte;
@@ -284,22 +297,23 @@ typedef struct carsym {
   file_ptr file_offset;                /* look here to find the file */
 } carsym;                      /* to make these you call a carsymogen */
 
-
 /* Used in generating armaps (archive tables of contents).
    Perhaps just a forward definition would do? */
 struct orl {                   /* output ranlib */
   char **name;                 /* symbol name */
-  file_ptr pos;                        /* bfd* or file position */
+  union {
+    file_ptr pos;
+    bfd *abfd;
+  } u;                         /* bfd* or file position */
   int namidx;                  /* index into string table */
 };
 \f
-
 /* Linenumber stuff */
 typedef struct lineno_cache_entry {
   unsigned int line_number;    /* Linenumber from start of function*/
   union {
     struct symbol_cache_entry *sym; /* Function name */
-    unsigned long offset;      /* Offset into section */
+    bfd_vma offset;        /* Offset into section */
   } u;
 } alent;
 \f
@@ -342,11 +356,11 @@ typedef struct _symbol_info
 {
   symvalue value;
   char type;
-  CONST char *name;            /* Symbol name.  */
+  const char *name;            /* Symbol name.  */
   unsigned char stab_type;     /* Stab type.  */
-  char stab_other;             /* Stab other. */
+  char stab_other;             /* Stab other.  */
   short stab_desc;             /* Stab desc.  */
-  CONST char *stab_name;       /* String for stab type.  */
+  const char *stab_name;       /* String for stab type.  */
 } symbol_info;
 
 /* Get the name of a stabs type code.  */
@@ -472,15 +486,31 @@ extern void bfd_hash_traverse PARAMS ((struct bfd_hash_table *,
 /* Direct I/O routines, for programs which know more about the object
    file than BFD does.  Use higher level routines if possible.  */
 
-extern bfd_size_type bfd_read
-  PARAMS ((PTR, bfd_size_type size, bfd_size_type nitems, bfd *abfd));
-extern bfd_size_type bfd_write
-  PARAMS ((const PTR, bfd_size_type size, bfd_size_type nitems, bfd *abfd));
-extern int bfd_seek PARAMS ((bfd *abfd, file_ptr fp, int direction));
-extern long bfd_tell PARAMS ((bfd *abfd));
-extern int bfd_flush PARAMS ((bfd *abfd));
-extern int bfd_stat PARAMS ((bfd *abfd, struct stat *));
-
+extern bfd_size_type bfd_bread PARAMS ((PTR, bfd_size_type, bfd *));
+extern bfd_size_type bfd_bwrite PARAMS ((const PTR, bfd_size_type, bfd *));
+extern int bfd_seek PARAMS ((bfd *, file_ptr, int));
+extern ufile_ptr bfd_tell PARAMS ((bfd *));
+extern int bfd_flush PARAMS ((bfd *));
+extern int bfd_stat PARAMS ((bfd *, struct stat *));
+
+/* Deprecated old routines.  */
+#if __GNUC__
+#define bfd_read(BUF, ELTSIZE, NITEMS, ABFD)                           \
+  (warn_deprecated ("bfd_read", __FILE__, __LINE__, __FUNCTION__),     \
+   bfd_bread ((BUF), (ELTSIZE) * (NITEMS), (ABFD)))
+#define bfd_write(BUF, ELTSIZE, NITEMS, ABFD)                          \
+  (warn_deprecated ("bfd_write", __FILE__, __LINE__, __FUNCTION__),    \
+   bfd_bwrite ((BUF), (ELTSIZE) * (NITEMS), (ABFD)))
+#else
+#define bfd_read(BUF, ELTSIZE, NITEMS, ABFD)                           \
+  (warn_deprecated ("bfd_read", (const char *) 0, 0, (const char *) 0), \
+   bfd_bread ((BUF), (ELTSIZE) * (NITEMS), (ABFD)))
+#define bfd_write(BUF, ELTSIZE, NITEMS, ABFD)                          \
+  (warn_deprecated ("bfd_write", (const char *) 0, 0, (const char *) 0),\
+   bfd_bwrite ((BUF), (ELTSIZE) * (NITEMS), (ABFD)))
+#endif
+extern void warn_deprecated
+  PARAMS ((const char *, const char *, int, const char *));
 
 /* Cast from const char * to char * so that caller can assign to
    a char * without a warning.  */
@@ -514,7 +544,10 @@ extern int bfd_stat PARAMS ((bfd *abfd, struct stat *));
 
 #define bfd_get_symbol_leading_char(abfd) ((abfd)->xvec->symbol_leading_char)
 
-#define bfd_set_cacheable(abfd,bool) (((abfd)->cacheable = (boolean)(bool)), true)
+#define bfd_set_cacheable(abfd,bool) (((abfd)->cacheable = (boolean) (bool)), true)
+
+extern boolean bfd_cache_close PARAMS ((bfd *abfd));
+/* NB: This declaration should match the autogenerated one in libbfd.h.  */
 
 extern boolean bfd_record_phdr
   PARAMS ((bfd *, unsigned long, boolean, flagword, boolean, bfd_vma,
@@ -540,6 +573,11 @@ void               bfd_putb32         PARAMS ((bfd_vma, unsigned char *));
 void           bfd_putl32         PARAMS ((bfd_vma, unsigned char *));
 void           bfd_putb16         PARAMS ((bfd_vma, unsigned char *));
 void           bfd_putl16         PARAMS ((bfd_vma, unsigned char *));
+
+/* Byte swapping routines which take size and endiannes as arguments.  */
+
+bfd_vma         bfd_get_bits       PARAMS ((bfd_byte *, int, boolean));
+void            bfd_put_bits       PARAMS ((bfd_vma, bfd_byte *, int, boolean));
 \f
 /* Externally visible ECOFF routines.  */
 
@@ -619,15 +657,18 @@ extern struct bfd_link_needed_list *bfd_elf_get_needed_list
 extern boolean bfd_elf_get_bfd_needed_list
   PARAMS ((bfd *, struct bfd_link_needed_list **));
 extern boolean bfd_elf32_size_dynamic_sections
-  PARAMS ((bfd *, const char *, const char *, boolean, const char *,
+  PARAMS ((bfd *, const char *, const char *, const char *,
           const char * const *, struct bfd_link_info *, struct sec **,
           struct bfd_elf_version_tree *));
 extern boolean bfd_elf64_size_dynamic_sections
-  PARAMS ((bfd *, const char *, const char *, boolean, const char *,
+  PARAMS ((bfd *, const char *, const char *, const char *,
           const char * const *, struct bfd_link_info *, struct sec **,
           struct bfd_elf_version_tree *));
 extern void bfd_elf_set_dt_needed_name PARAMS ((bfd *, const char *));
+extern void bfd_elf_set_dt_needed_soname PARAMS ((bfd *, const char *));
 extern const char *bfd_elf_get_dt_soname PARAMS ((bfd *));
+extern struct bfd_link_needed_list *bfd_elf_get_runpath_list
+  PARAMS ((bfd *, struct bfd_link_info *));
 
 /* Return an upper bound on the number of bytes required to store a
    copy of ABFD's program header table entries.  Return -1 if an error
@@ -646,9 +687,13 @@ extern int bfd_get_elf_phdrs PARAMS ((bfd *abfd, void *phdrs));
 /* Return the arch_size field of an elf bfd, or -1 if not elf.  */
 extern int bfd_get_arch_size PARAMS ((bfd *));
 
-/* Return true if address "naturally" sign extends, or -1 if not elf. */
+/* Return true if address "naturally" sign extends, or -1 if not elf.  */
 extern int bfd_get_sign_extend_vma PARAMS ((bfd *));
 
+extern boolean bfd_m68k_elf32_create_embedded_relocs
+  PARAMS ((bfd *, struct bfd_link_info *, struct sec *, struct sec *,
+          char **));
+
 /* SunOS shared library support routines for the linker.  */
 
 extern struct bfd_link_needed_list *bfd_sunos_get_needed_list
@@ -698,10 +743,9 @@ extern boolean bfd_xcoff_link_record_set
           bfd_size_type));
 extern boolean bfd_xcoff_import_symbol
   PARAMS ((bfd *, struct bfd_link_info *, struct bfd_link_hash_entry *,
-          bfd_vma, const char *, const char *, const char *));
+          bfd_vma, const char *, const char *, const char *, unsigned int));
 extern boolean bfd_xcoff_export_symbol
-  PARAMS ((bfd *, struct bfd_link_info *, struct bfd_link_hash_entry *,
-          boolean));
+  PARAMS ((bfd *, struct bfd_link_info *, struct bfd_link_hash_entry *));
 extern boolean bfd_xcoff_link_count_reloc
   PARAMS ((bfd *, struct bfd_link_info *, const char *));
 extern boolean bfd_xcoff_record_link_assignment
@@ -727,6 +771,10 @@ extern boolean bfd_coff_get_auxent
 extern boolean bfd_coff_set_symbol_class
   PARAMS ((bfd *, struct symbol_cache_entry *, unsigned int));
 
+extern boolean bfd_m68k_coff_create_embedded_relocs
+  PARAMS ((bfd *, struct bfd_link_info *, struct sec *, struct sec *,
+          char **));
+
 /* ARM Interworking support.  Called from linker.  */
 extern boolean bfd_arm_allocate_interworking_sections
   PARAMS ((struct bfd_link_info *));
@@ -757,7 +805,7 @@ extern boolean bfd_elf32_arm_process_before_allocation
 extern boolean bfd_elf32_arm_get_bfd_for_interworking
   PARAMS ((bfd *, struct bfd_link_info *));
 
-/* TI COFF load page support. */
+/* TI COFF load page support.  */
 extern void bfd_ticoff_set_section_load_page
   PARAMS ((struct sec *, int));
 
@@ -765,47 +813,47 @@ extern int bfd_ticoff_get_section_load_page
   PARAMS ((struct sec *));
 
 /* And more from the source.  */
-void 
+void
 bfd_init PARAMS ((void));
 
 bfd *
-bfd_openr PARAMS ((CONST char *filename, CONST char *target));
+bfd_openr PARAMS ((const char *filename, const char *target));
 
 bfd *
-bfd_fdopenr PARAMS ((CONST char *filename, CONST char *target, int fd));
+bfd_fdopenr PARAMS ((const char *filename, const char *target, int fd));
 
 bfd *
 bfd_openstreamr PARAMS ((const char *, const char *, PTR));
 
 bfd *
-bfd_openw PARAMS ((CONST char *filename, CONST char *target));
+bfd_openw PARAMS ((const char *filename, const char *target));
 
-boolean 
+boolean
 bfd_close PARAMS ((bfd *abfd));
 
-boolean 
+boolean
 bfd_close_all_done PARAMS ((bfd *));
 
 bfd *
-bfd_create PARAMS ((CONST char *filename, bfd *templ));
+bfd_create PARAMS ((const char *filename, bfd *templ));
 
-boolean 
+boolean
 bfd_make_writable PARAMS ((bfd *abfd));
 
-boolean 
+boolean
 bfd_make_readable PARAMS ((bfd *abfd));
 
 
 /* Byte swapping macros for user section data.  */
 
 #define bfd_put_8(abfd, val, ptr) \
-                ((void) (*((unsigned char *)(ptr)) = (unsigned char)(val)))
+                ((void) (*((unsigned char *) (ptr)) = (unsigned char) (val)))
 #define bfd_put_signed_8 \
                bfd_put_8
 #define bfd_get_8(abfd, ptr) \
-                (*(unsigned char *)(ptr))
+                (*(unsigned char *) (ptr) & 0xff)
 #define bfd_get_signed_8(abfd, ptr) \
-               ((*(unsigned char *)(ptr) ^ 0x80) - 0x80)
+               (((*(unsigned char *) (ptr) & 0xff) ^ 0x80) - 0x80)
 
 #define bfd_put_16(abfd, val, ptr) \
                 BFD_SEND(abfd, bfd_putx16, ((val),(ptr)))
@@ -852,40 +900,88 @@ bfd_make_readable PARAMS ((bfd *abfd));
 /* Byte swapping macros for file header data.  */
 
 #define bfd_h_put_8(abfd, val, ptr) \
-               bfd_put_8 (abfd, val, ptr)
+  bfd_put_8 (abfd, val, ptr)
 #define bfd_h_put_signed_8(abfd, val, ptr) \
-               bfd_put_8 (abfd, val, ptr)
+  bfd_put_8 (abfd, val, ptr)
 #define bfd_h_get_8(abfd, ptr) \
-               bfd_get_8 (abfd, ptr)
+  bfd_get_8 (abfd, ptr)
 #define bfd_h_get_signed_8(abfd, ptr) \
-               bfd_get_signed_8 (abfd, ptr)
+  bfd_get_signed_8 (abfd, ptr)
 
 #define bfd_h_put_16(abfd, val, ptr) \
-                BFD_SEND(abfd, bfd_h_putx16,(val,ptr))
+  BFD_SEND (abfd, bfd_h_putx16, (val, ptr))
 #define bfd_h_put_signed_16 \
-                bfd_h_put_16
+  bfd_h_put_16
 #define bfd_h_get_16(abfd, ptr) \
-                BFD_SEND(abfd, bfd_h_getx16,(ptr))
+  BFD_SEND (abfd, bfd_h_getx16, (ptr))
 #define bfd_h_get_signed_16(abfd, ptr) \
-                BFD_SEND(abfd, bfd_h_getx_signed_16, (ptr))
+  BFD_SEND (abfd, bfd_h_getx_signed_16, (ptr))
 
 #define bfd_h_put_32(abfd, val, ptr) \
-                BFD_SEND(abfd, bfd_h_putx32,(val,ptr))
+  BFD_SEND (abfd, bfd_h_putx32, (val, ptr))
 #define bfd_h_put_signed_32 \
-                bfd_h_put_32
+  bfd_h_put_32
 #define bfd_h_get_32(abfd, ptr) \
-                BFD_SEND(abfd, bfd_h_getx32,(ptr))
+  BFD_SEND (abfd, bfd_h_getx32, (ptr))
 #define bfd_h_get_signed_32(abfd, ptr) \
-                BFD_SEND(abfd, bfd_h_getx_signed_32, (ptr))
+  BFD_SEND (abfd, bfd_h_getx_signed_32, (ptr))
 
 #define bfd_h_put_64(abfd, val, ptr) \
-                BFD_SEND(abfd, bfd_h_putx64,(val, ptr))
+  BFD_SEND (abfd, bfd_h_putx64, (val, ptr))
 #define bfd_h_put_signed_64 \
-                bfd_h_put_64
+  bfd_h_put_64
 #define bfd_h_get_64(abfd, ptr) \
-                BFD_SEND(abfd, bfd_h_getx64,(ptr))
+  BFD_SEND (abfd, bfd_h_getx64, (ptr))
 #define bfd_h_get_signed_64(abfd, ptr) \
-                BFD_SEND(abfd, bfd_h_getx_signed_64, (ptr))
+  BFD_SEND (abfd, bfd_h_getx_signed_64, (ptr))
+
+/* Refinements on the above, which should eventually go away.  Save
+   cluttering the source with (bfd_vma) and (bfd_byte *) casts.  */
+
+#define H_PUT_64(abfd, val, where) \
+  bfd_h_put_64 ((abfd), (bfd_vma) (val), (bfd_byte *) (where))
+
+#define H_PUT_32(abfd, val, where) \
+  bfd_h_put_32 ((abfd), (bfd_vma) (val), (bfd_byte *) (where))
+
+#define H_PUT_16(abfd, val, where) \
+  bfd_h_put_16 ((abfd), (bfd_vma) (val), (bfd_byte *) (where))
+
+#define H_PUT_8 bfd_h_put_8
+
+#define H_PUT_S64(abfd, val, where) \
+  bfd_h_put_signed_64 ((abfd), (bfd_vma) (val), (bfd_byte *) (where))
+
+#define H_PUT_S32(abfd, val, where) \
+  bfd_h_put_signed_32 ((abfd), (bfd_vma) (val), (bfd_byte *) (where))
+
+#define H_PUT_S16(abfd, val, where) \
+  bfd_h_put_signed_16 ((abfd), (bfd_vma) (val), (bfd_byte *) (where))
+
+#define H_PUT_S8 bfd_h_put_signed_8
+
+#define H_GET_64(abfd, where) \
+  bfd_h_get_64 ((abfd), (bfd_byte *) (where))
+
+#define H_GET_32(abfd, where) \
+  bfd_h_get_32 ((abfd), (bfd_byte *) (where))
+
+#define H_GET_16(abfd, where) \
+  bfd_h_get_16 ((abfd), (bfd_byte *) (where))
+
+#define H_GET_8 bfd_h_get_8
+
+#define H_GET_S64(abfd, where) \
+  bfd_h_get_signed_64 ((abfd), (bfd_byte *) (where))
+
+#define H_GET_S32(abfd, where) \
+  bfd_h_get_signed_32 ((abfd), (bfd_byte *) (where))
+
+#define H_GET_S16(abfd, where) \
+  bfd_h_get_signed_16 ((abfd), (bfd_byte *) (where))
+
+#define H_GET_S8 bfd_h_get_signed_8
+
 
 /* This structure is used for a comdat section, as in PE.  A comdat
    section is associated with a particular symbol.  When the linker
@@ -902,10 +998,6 @@ struct bfd_comdat_info
      specific code; it is not an index into the list returned by
      bfd_canonicalize_symtab.  */
   long symbol;
-
-  /* If this section is being discarded, the linker uses this field
-     to point to the input section which is being kept.  */
-  struct sec *sec;
 };
 
 typedef struct sec
@@ -1001,6 +1093,14 @@ typedef struct sec
      sections.  */
 #define SEC_COFF_SHARED_LIBRARY 0x800
 
+  /* The section has GOT references.  This flag is only for the
+     linker, and is currently only used by the elf32-hppa back end.
+     It will be set if global offset table references were detected
+     in this section, which indicate to the linker that the section
+     contains PIC code, and must be handled specially when doing a
+     static link.  */
+#define SEC_HAS_GOT_REF 0x4000
+
   /* The section contains common symbols (symbols may be defined
      multiple times, the value of a symbol is the amount of
      space it requires, and the largest symbol value is the one
@@ -1084,6 +1184,15 @@ typedef struct sec
      references found to any symbol in the section.  */
 #define SEC_CLINK 0x10000000
 
+  /* Attempt to merge identical entities in the section.
+     Entity size is given in the entsize field.  */
+#define SEC_MERGE 0x20000000
+
+  /* If given with SEC_MERGE, entities to merge are zero terminated
+     strings where entsize specifies character size instead of fixed
+     size entries.  */
+#define SEC_STRINGS 0x40000000
+
   /*  End of section flags.  */
 
   /* Some internal packed boolean fields.  */
@@ -1097,9 +1206,16 @@ typedef struct sec
   /* A mark flag used by some of the linker backends.  */
   unsigned int linker_mark : 1;
 
+  /* Another mark flag used by some of the linker backends.  Set for
+     output sections that have a input section.  */
+  unsigned int linker_has_input : 1;
+
   /* A mark flag used by some linker backends for garbage collection.  */
   unsigned int gc_mark : 1;
 
+  /* Used by the ELF code to mark sections which have been allocated to segments.  */
+  unsigned int segment_mark : 1;
+
   /* End of internal packed boolean fields.  */
 
   /*  The virtual memory address of the section - where it will be
@@ -1193,10 +1309,18 @@ typedef struct sec
 
   unsigned int lineno_count;
 
+  /* Entity size for merging purposes.  */
+
+  unsigned int entsize;
+
   /* Optional information about a COMDAT entry; NULL if not COMDAT.  */
 
   struct bfd_comdat_info *comdat;
 
+  /* Points to the kept section if this section is a link-once section,
+     and is discarded.  */
+  struct sec *kept_section;
+
   /* When a section is being output, this value changes as more
      linenumbers are written out.  */
 
@@ -1264,6 +1388,11 @@ extern const struct symbol_cache_entry * const bfd_ind_symbol;
 asection *
 bfd_get_section_by_name PARAMS ((bfd *abfd, const char *name));
 
+char *
+bfd_get_unique_section_name PARAMS ((bfd *abfd,
+    const char *templat,
+    int *count));
+
 asection *
 bfd_make_section_old_way PARAMS ((bfd *abfd, const char *name));
 
@@ -1273,43 +1402,40 @@ bfd_make_section_anyway PARAMS ((bfd *abfd, const char *name));
 asection *
 bfd_make_section PARAMS ((bfd *, const char *name));
 
-boolean 
+boolean
 bfd_set_section_flags PARAMS ((bfd *abfd, asection *sec, flagword flags));
 
-void 
+void
 bfd_map_over_sections PARAMS ((bfd *abfd,
-    void (*func)(bfd *abfd,
+    void (*func) (bfd *abfd,
     asection *sect,
     PTR obj),
     PTR obj));
 
-boolean 
+boolean
 bfd_set_section_size PARAMS ((bfd *abfd, asection *sec, bfd_size_type val));
 
-boolean 
-bfd_set_section_contents
- PARAMS ((bfd *abfd,
-    asection *section,
-    PTR data,
-    file_ptr offset,
+boolean
+bfd_set_section_contents PARAMS ((bfd *abfd, asection *section,
+    PTR data, file_ptr offset,
     bfd_size_type count));
 
-boolean 
-bfd_get_section_contents
PARAMS ((bfd *abfd, asection *section, PTR location,
-    file_ptr offset, bfd_size_type count));
+boolean
+bfd_get_section_contents PARAMS ((bfd *abfd, asection *section,
   PTR location, file_ptr offset,
+    bfd_size_type count));
 
-boolean 
-bfd_copy_private_section_data PARAMS ((bfd *ibfd, asection *isec, bfd *obfd, asection *osec));
+boolean
+bfd_copy_private_section_data PARAMS ((bfd *ibfd, asection *isec,
+    bfd *obfd, asection *osec));
 
 #define bfd_copy_private_section_data(ibfd, isection, obfd, osection) \
      BFD_SEND (obfd, _bfd_copy_private_section_data, \
                (ibfd, isection, obfd, osection))
-void 
-_bfd_strip_section_from_output
- PARAMS ((struct bfd_link_info *info, asection *section));
+void
+_bfd_strip_section_from_output PARAMS ((struct bfd_link_info *info, asection *section));
 
-enum bfd_architecture 
+enum bfd_architecture
 {
   bfd_arch_unknown,   /* File arch not known */
   bfd_arch_obscure,   /* Arch known, not one of these */
@@ -1322,14 +1448,18 @@ enum bfd_architecture
 #define bfd_mach_m68040 6
 #define bfd_mach_m68060 7
 #define bfd_mach_cpu32  8
-  bfd_arch_vax,       /* DEC Vax */   
+#define bfd_mach_mcf5200  9
+#define bfd_mach_mcf5206e 10
+#define bfd_mach_mcf5307  11
+#define bfd_mach_mcf5407  12
+  bfd_arch_vax,       /* DEC Vax */
   bfd_arch_i960,      /* Intel 960 */
     /* The order of the following is important.
-       lower number indicates a machine type that 
+       lower number indicates a machine type that
        only accepts a subset of the instructions
        available to machines with higher numbers.
        The exception is the "ca", which is
-       incompatible with all other machines except 
+       incompatible with all other machines except
        "core". */
 
 #define bfd_mach_i960_core      1
@@ -1352,9 +1482,12 @@ enum bfd_architecture
 #define bfd_mach_sparc_sparclite_le    6
 #define bfd_mach_sparc_v9              7
 #define bfd_mach_sparc_v9a             8 /* with ultrasparc add'ns */
+#define bfd_mach_sparc_v8plusb         9 /* with cheetah add'ns */
+#define bfd_mach_sparc_v9b             10 /* with cheetah add'ns */
 /* Nonzero if MACH has the v9 instruction set.  */
 #define bfd_mach_sparc_v9_p(mach) \
-  ((mach) >= bfd_mach_sparc_v8plus && (mach) <= bfd_mach_sparc_v9a)
+  ((mach) >= bfd_mach_sparc_v8plus && (mach) <= bfd_mach_sparc_v9b \
+   && (mach) != bfd_mach_sparc_sparclite_le)
   bfd_arch_mips,      /* MIPS Rxxxx */
 #define bfd_mach_mips3000              3000
 #define bfd_mach_mips3900              3900
@@ -1370,11 +1503,18 @@ enum bfd_architecture
 #define bfd_mach_mips6000              6000
 #define bfd_mach_mips8000              8000
 #define bfd_mach_mips10000             10000
+#define bfd_mach_mips12000             12000
 #define bfd_mach_mips16                16
+#define bfd_mach_mips5                 5
+#define bfd_mach_mips_sb1              12310201 /* octal 'SB', 01 */
+#define bfd_mach_mipsisa32             32
+#define bfd_mach_mipsisa64             64
   bfd_arch_i386,      /* Intel 386 */
 #define bfd_mach_i386_i386 0
 #define bfd_mach_i386_i8086 1
 #define bfd_mach_i386_i386_intel_syntax 2
+#define bfd_mach_x86_64 3
+#define bfd_mach_x86_64_intel_syntax 4
   bfd_arch_we32k,     /* AT&T WE32xxx */
   bfd_arch_tahoe,     /* CCI/Harris Tahoe */
   bfd_arch_i860,      /* Intel 860 */
@@ -1388,6 +1528,7 @@ enum bfd_architecture
 #define bfd_mach_h8300   1
 #define bfd_mach_h8300h  2
 #define bfd_mach_h8300s  3
+  bfd_arch_pdp11,     /* DEC PDP-11 */
   bfd_arch_powerpc,   /* PowerPC */
 #define bfd_mach_ppc           0
 #define bfd_mach_ppc_403       403
@@ -1444,6 +1585,8 @@ enum bfd_architecture
 #define bfd_mach_arm_4T        6
 #define bfd_mach_arm_5         7
 #define bfd_mach_arm_5T        8
+#define bfd_mach_arm_5TE       9
+#define bfd_mach_arm_XScale    10
   bfd_arch_ns32k,     /* National Semiconductors ns32000 */
   bfd_arch_w65,       /* WDC 65816 */
   bfd_arch_tic30,     /* Texas Instruments TMS320C30 */
@@ -1453,8 +1596,11 @@ enum bfd_architecture
 #define bfd_mach_v850          0
 #define bfd_mach_v850e         'E'
 #define bfd_mach_v850ea        'A'
-  bfd_arch_arc,       /* Argonaut RISC Core */
-#define bfd_mach_arc_base 0
+  bfd_arch_arc,       /* ARC Cores */
+#define bfd_mach_arc_5         0
+#define bfd_mach_arc_6         1
+#define bfd_mach_arc_7         2
+#define bfd_mach_arc_8         3
   bfd_arch_m32r,      /* Mitsubishi M32R/D */
 #define bfd_mach_m32r          0 /* backwards compatibility */
 #define bfd_mach_m32rx         'x'
@@ -1466,6 +1612,8 @@ enum bfd_architecture
 #define bfd_mach_fr30          0x46523330
   bfd_arch_mcore,
   bfd_arch_ia64,      /* HP/Intel ia64 */
+#define bfd_mach_ia64_elf64    0
+#define bfd_mach_ia64_elf32    1
   bfd_arch_pj,
   bfd_arch_avr,       /* Atmel AVR microcontrollers */
 #define bfd_mach_avr1          1
@@ -1473,10 +1621,15 @@ enum bfd_architecture
 #define bfd_mach_avr3          3
 #define bfd_mach_avr4          4
 #define bfd_mach_avr5          5
+  bfd_arch_cris,      /* Axis CRIS */
+  bfd_arch_s390,      /* IBM s390 */
+#define bfd_mach_s390_esa      0
+#define bfd_mach_s390_esame    1
+  bfd_arch_openrisc,  /* OpenRISC */
   bfd_arch_last
   };
 
-typedef struct bfd_arch_info 
+typedef struct bfd_arch_info
 {
   int bits_per_word;
   int bits_per_address;
@@ -1487,7 +1640,7 @@ typedef struct bfd_arch_info
   const char *printable_name;
   unsigned int section_align_power;
   /* True if this is the default machine for the architecture.  */
-  boolean the_default; 
+  boolean the_default;
   const struct bfd_arch_info * (*compatible)
        PARAMS ((const struct bfd_arch_info *a,
                 const struct bfd_arch_info *b));
@@ -1510,68 +1663,66 @@ bfd_arch_get_compatible PARAMS ((
     const bfd *abfd,
     const bfd *bbfd));
 
-void 
+void
 bfd_set_arch_info PARAMS ((bfd *abfd, const bfd_arch_info_type *arg));
 
-enum bfd_architecture 
+enum bfd_architecture
 bfd_get_arch PARAMS ((bfd *abfd));
 
-unsigned long 
+unsigned long
 bfd_get_mach PARAMS ((bfd *abfd));
 
-unsigned int 
+unsigned int
 bfd_arch_bits_per_byte PARAMS ((bfd *abfd));
 
-unsigned int 
+unsigned int
 bfd_arch_bits_per_address PARAMS ((bfd *abfd));
 
-const bfd_arch_info_type * 
+const bfd_arch_info_type *
 bfd_get_arch_info PARAMS ((bfd *abfd));
 
 const bfd_arch_info_type *
-bfd_lookup_arch
- PARAMS ((enum bfd_architecture
+bfd_lookup_arch PARAMS ((enum bfd_architecture
     arch,
     unsigned long machine));
 
 const char *
-bfd_printable_arch_mach
- PARAMS ((enum bfd_architecture arch, unsigned long machine));
+bfd_printable_arch_mach PARAMS ((enum bfd_architecture arch, unsigned long machine));
 
-unsigned int 
+unsigned int
 bfd_octets_per_byte PARAMS ((bfd *abfd));
 
-unsigned int 
+unsigned int
 bfd_arch_mach_octets_per_byte PARAMS ((enum bfd_architecture arch,
     unsigned long machine));
 
 typedef enum bfd_reloc_status
 {
-       /* No errors detected */
+  /* No errors detected */
   bfd_reloc_ok,
 
-       /* The relocation was performed, but there was an overflow. */
+  /* The relocation was performed, but there was an overflow. */
   bfd_reloc_overflow,
 
-       /* The address to relocate was not within the section supplied. */
+  /* The address to relocate was not within the section supplied. */
   bfd_reloc_outofrange,
 
-       /* Used by special functions */
+  /* Used by special functions */
   bfd_reloc_continue,
 
-       /* Unsupported relocation size requested. */
+  /* Unsupported relocation size requested. */
   bfd_reloc_notsupported,
 
-       /* Unused */
+  /* Unused */
   bfd_reloc_other,
 
-       /* The symbol to relocate against was undefined. */
+  /* The symbol to relocate against was undefined. */
   bfd_reloc_undefined,
 
-       /* The relocation was performed, but may not be ok - presently
-          generated only when linking i960 coff files with i960 b.out
-          symbols.  If this type is returned, the error_message argument
-          to bfd_perform_relocation will be set.  */
+  /* The relocation was performed, but may not be ok - presently
+     generated only when linking i960 coff files with i960 b.out
+     symbols.  If this type is returned, the error_message argument
+     to bfd_perform_relocation will be set.  */
   bfd_reloc_dangerous
  }
  bfd_reloc_status_type;
@@ -1579,169 +1730,166 @@ typedef enum bfd_reloc_status
 
 typedef struct reloc_cache_entry
 {
-       /* A pointer into the canonical table of pointers  */
+  /* A pointer into the canonical table of pointers  */
   struct symbol_cache_entry **sym_ptr_ptr;
 
-       /* offset in section */
+  /* offset in section */
   bfd_size_type address;
 
-       /* addend for relocation value */
+  /* addend for relocation value */
   bfd_vma addend;
 
-       /* Pointer to how to perform the required relocation */
+  /* Pointer to how to perform the required relocation */
   reloc_howto_type *howto;
 
 } arelent;
 enum complain_overflow
 {
-       /* Do not complain on overflow. */
+  /* Do not complain on overflow. */
   complain_overflow_dont,
 
-       /* Complain if the bitfield overflows, whether it is considered
-          as signed or unsigned. */
+  /* Complain if the bitfield overflows, whether it is considered
+     as signed or unsigned. */
   complain_overflow_bitfield,
 
-       /* Complain if the value overflows when considered as signed
-          number. */
+  /* Complain if the value overflows when considered as signed
+     number. */
   complain_overflow_signed,
 
-       /* Complain if the value overflows when considered as an
-          unsigned number. */
+  /* Complain if the value overflows when considered as an
+     unsigned number. */
   complain_overflow_unsigned
 };
 
 struct reloc_howto_struct
 {
-       /*  The type field has mainly a documentary use - the back end can
-           do what it wants with it, though normally the back end's
-           external idea of what a reloc number is stored
-           in this field. For example, a PC relative word relocation
-           in a coff environment has the type 023 - because that's
-           what the outside world calls a R_PCRWORD reloc. */
+  /*  The type field has mainly a documentary use - the back end can
+      do what it wants with it, though normally the back end's
+      external idea of what a reloc number is stored
+      in this field.  For example, a PC relative word relocation
+      in a coff environment has the type 023 - because that's
+      what the outside world calls a R_PCRWORD reloc.  */
   unsigned int type;
 
-       /*  The value the final relocation is shifted right by. This drops
-           unwanted data from the relocation.  */
+  /*  The value the final relocation is shifted right by.  This drops
+      unwanted data from the relocation.  */
   unsigned int rightshift;
 
-       /*  The size of the item to be relocated.  This is *not* a
-           power-of-two measure.  To get the number of bytes operated
-           on by a type of relocation, use bfd_get_reloc_size.  */
+  /*  The size of the item to be relocated.  This is *not* a
+      power-of-two measure.  To get the number of bytes operated
+      on by a type of relocation, use bfd_get_reloc_size.  */
   int size;
 
-       /*  The number of bits in the item to be relocated.  This is used
-           when doing overflow checking.  */
+  /*  The number of bits in the item to be relocated.  This is used
+      when doing overflow checking.  */
   unsigned int bitsize;
 
-       /*  Notes that the relocation is relative to the location in the
-           data section of the addend. The relocation function will
-           subtract from the relocation value the address of the location
-           being relocated. */
+  /*  Notes that the relocation is relative to the location in the
+      data section of the addend.  The relocation function will
+      subtract from the relocation value the address of the location
+      being relocated.  */
   boolean pc_relative;
 
-       /*  The bit position of the reloc value in the destination.
-           The relocated value is left shifted by this amount. */
+  /*  The bit position of the reloc value in the destination.
+      The relocated value is left shifted by this amount.  */
   unsigned int bitpos;
 
-       /* What type of overflow error should be checked for when
-          relocating. */
+  /* What type of overflow error should be checked for when
+     relocating.  */
   enum complain_overflow complain_on_overflow;
 
-       /* If this field is non null, then the supplied function is
-          called rather than the normal function. This allows really
-          strange relocation methods to be accomodated (e.g., i960 callj
-          instructions). */
+  /* If this field is non null, then the supplied function is
+     called rather than the normal function.  This allows really
+     strange relocation methods to be accomodated (e.g., i960 callj
+     instructions).  */
   bfd_reloc_status_type (*special_function)
-                                   PARAMS ((bfd *abfd,
-                                            arelent *reloc_entry,
-                                            struct symbol_cache_entry *symbol,
-                                            PTR data,
-                                            asection *input_section,
-                                            bfd *output_bfd,
-                                            char **error_message));
-
-       /* The textual name of the relocation type. */
+    PARAMS ((bfd *, arelent *, struct symbol_cache_entry *, PTR, asection *,
+             bfd *, char **));
+
+  /* The textual name of the relocation type.  */
   char *name;
 
-       /* Some formats record a relocation addend in the section contents
-          rather than with the relocation.  For ELF formats this is the
-          distinction between USE_REL and USE_RELA (though the code checks
-          for USE_REL == 1/0).  The value of this field is TRUE if the
-          addend is recorded with the section contents; when performing a
-          partial link (ld -r) the section contents (the data) will be
-          modified.  The value of this field is FALSE if addends are
-          recorded with the relocation (in arelent.addend); when performing
-          a partial link the relocation will be modified.
-          All relocations for all ELF USE_RELA targets should set this field
-          to FALSE (values of TRUE should be looked on with suspicion).
-          However, the converse is not true: not all relocations of all ELF
-          USE_REL targets set this field to TRUE.  Why this is so is peculiar
-          to each particular target.  For relocs that aren't used in partial
-          links (e.g. GOT stuff) it doesn't matter what this is set to.  */
+  /* Some formats record a relocation addend in the section contents
+     rather than with the relocation.  For ELF formats this is the
+     distinction between USE_REL and USE_RELA (though the code checks
+     for USE_REL == 1/0).  The value of this field is TRUE if the
+     addend is recorded with the section contents; when performing a
+     partial link (ld -r) the section contents (the data) will be
+     modified.  The value of this field is FALSE if addends are
+     recorded with the relocation (in arelent.addend); when performing
+     a partial link the relocation will be modified.
+     All relocations for all ELF USE_RELA targets should set this field
+     to FALSE (values of TRUE should be looked on with suspicion).
+     However, the converse is not true: not all relocations of all ELF
+     USE_REL targets set this field to TRUE.  Why this is so is peculiar
+     to each particular target.  For relocs that aren't used in partial
+     links (e.g. GOT stuff) it doesn't matter what this is set to.  */
   boolean partial_inplace;
 
-       /* The src_mask selects which parts of the read in data
-          are to be used in the relocation sum.  E.g., if this was an 8 bit
-          byte of data which we read and relocated, this would be
-          0x000000ff. When we have relocs which have an addend, such as
-          sun4 extended relocs, the value in the offset part of a
-          relocating field is garbage so we never use it. In this case
-          the mask would be 0x00000000. */
+  /* The src_mask selects which parts of the read in data
+     are to be used in the relocation sum.  E.g., if this was an 8 bit
+     byte of data which we read and relocated, this would be
+     0x000000ff.  When we have relocs which have an addend, such as
+     sun4 extended relocs, the value in the offset part of a
+     relocating field is garbage so we never use it.  In this case
+     the mask would be 0x00000000.  */
   bfd_vma src_mask;
 
-       /* The dst_mask selects which parts of the instruction are replaced
-          into the instruction. In most cases src_mask == dst_mask,
-          except in the above special case, where dst_mask would be
-          0x000000ff, and src_mask would be 0x00000000.   */
+  /* The dst_mask selects which parts of the instruction are replaced
+     into the instruction.  In most cases src_mask == dst_mask,
+     except in the above special case, where dst_mask would be
+     0x000000ff, and src_mask would be 0x00000000.  */
   bfd_vma dst_mask;
 
-       /* When some formats create PC relative instructions, they leave
-          the value of the pc of the place being relocated in the offset
-          slot of the instruction, so that a PC relative relocation can
-          be made just by adding in an ordinary offset (e.g., sun3 a.out).
-          Some formats leave the displacement part of an instruction
-          empty (e.g., m88k bcs); this flag signals the fact.*/
+  /* When some formats create PC relative instructions, they leave
+     the value of the pc of the place being relocated in the offset
+     slot of the instruction, so that a PC relative relocation can
+     be made just by adding in an ordinary offset (e.g., sun3 a.out).
+     Some formats leave the displacement part of an instruction
+     empty (e.g., m88k bcs); this flag signals the fact.  */
   boolean pcrel_offset;
-
 };
-#define HOWTO(C, R,S,B, P, BI, O, SF, NAME, INPLACE, MASKSRC, MASKDST, PC) \
-  {(unsigned)C,R,S,B, P, BI, O,SF,NAME,INPLACE,MASKSRC,MASKDST,PC}
-#define NEWHOWTO( FUNCTION, NAME,SIZE,REL,IN) HOWTO(0,0,SIZE,0,REL,0,complain_overflow_dont,FUNCTION, NAME,false,0,0,IN)
+#define HOWTO(C, R, S, B, P, BI, O, SF, NAME, INPLACE, MASKSRC, MASKDST, PC) \
+  { (unsigned) C, R, S, B, P, BI, O, SF, NAME, INPLACE, MASKSRC, MASKDST, PC }
+#define NEWHOWTO(FUNCTION, NAME, SIZE, REL, IN) \
+  HOWTO (0, 0, SIZE, 0, REL, 0, complain_overflow_dont, FUNCTION, \
+         NAME, false, 0, 0, IN)
 
 #define EMPTY_HOWTO(C) \
-  HOWTO((C),0,0,0,false,0,complain_overflow_dont,NULL,NULL,false,0,0,false)
-
-#define HOWTO_PREPARE(relocation, symbol)      \
-  {                                            \
-  if (symbol != (asymbol *)NULL) {             \
-    if (bfd_is_com_section (symbol->section)) { \
-      relocation = 0;                          \
-    }                                          \
-    else {                                     \
-      relocation = symbol->value;              \
-    }                                          \
-  }                                            \
-}
-unsigned int 
-bfd_get_reloc_size  PARAMS ((reloc_howto_type *));
-
-typedef struct relent_chain {
+  HOWTO ((C), 0, 0, 0, false, 0, complain_overflow_dont, NULL, \
+         NULL, false, 0, 0, false)
+
+#define HOWTO_PREPARE(relocation, symbol)               \
+  {                                                     \
+    if (symbol != (asymbol *) NULL)                     \
+      {                                                 \
+        if (bfd_is_com_section (symbol->section))       \
+          {                                             \
+            relocation = 0;                             \
+          }                                             \
+        else                                            \
+          {                                             \
+            relocation = symbol->value;                 \
+          }                                             \
+      }                                                 \
+  }
+unsigned int
+bfd_get_reloc_size PARAMS ((reloc_howto_type *));
+
+typedef struct relent_chain
+{
   arelent relent;
-  struct   relent_chain *next;
+  struct relent_chain *next;
 } arelent_chain;
 bfd_reloc_status_type
-
-bfd_check_overflow
- PARAMS ((enum complain_overflow how,
+bfd_check_overflow PARAMS ((enum complain_overflow how,
     unsigned int bitsize,
     unsigned int rightshift,
     unsigned int addrsize,
     bfd_vma relocation));
 
 bfd_reloc_status_type
-
-bfd_perform_relocation
- PARAMS ((bfd *abfd,
+bfd_perform_relocation PARAMS ((bfd *abfd,
     arelent *reloc_entry,
     PTR data,
     asection *input_section,
@@ -1749,9 +1897,7 @@ bfd_perform_relocation
     char **error_message));
 
 bfd_reloc_status_type
-
-bfd_install_relocation
- PARAMS ((bfd *abfd,
+bfd_install_relocation PARAMS ((bfd *abfd,
     arelent *reloc_entry,
     PTR data, bfd_vma data_start,
     asection *input_section,
@@ -1792,10 +1938,12 @@ The 24-bit relocation is used in some Intel 960 configurations. */
   BFD_RELOC_HI16_GOTOFF,
   BFD_RELOC_HI16_S_GOTOFF,
   BFD_RELOC_8_GOTOFF,
+  BFD_RELOC_64_PLT_PCREL,
   BFD_RELOC_32_PLT_PCREL,
   BFD_RELOC_24_PLT_PCREL,
   BFD_RELOC_16_PLT_PCREL,
   BFD_RELOC_8_PLT_PCREL,
+  BFD_RELOC_64_PLTOFF,
   BFD_RELOC_32_PLTOFF,
   BFD_RELOC_16_PLTOFF,
   BFD_RELOC_LO16_PLTOFF,
@@ -1861,7 +2009,9 @@ relocation types already defined. */
   BFD_RELOC_SPARC_GLOB_DAT,
   BFD_RELOC_SPARC_JMP_SLOT,
   BFD_RELOC_SPARC_RELATIVE,
+  BFD_RELOC_SPARC_UA16,
   BFD_RELOC_SPARC_UA32,
+  BFD_RELOC_SPARC_UA64,
 
 /* I think these are specific to SPARC a.out (e.g., Sun 4). */
   BFD_RELOC_SPARC_BASE13,
@@ -1936,24 +2086,11 @@ as the absolute section symbol), and the "addend" indicates the type
 of instruction using the register:
 1 - "memory" fmt insn
 2 - byte-manipulation (byte offset reg)
-3 - jsr (target of branch)
-
-The GNU linker currently doesn't do any of this optimizing. */
+3 - jsr (target of branch) */
   BFD_RELOC_ALPHA_LITERAL,
   BFD_RELOC_ALPHA_ELF_LITERAL,
   BFD_RELOC_ALPHA_LITUSE,
 
-/* The BFD_RELOC_ALPHA_USER_* relocations are used by the assembler to
-process the explicit !<reloc>!sequence relocations, and are mapped
-into the normal relocations at the end of processing. */
-  BFD_RELOC_ALPHA_USER_LITERAL,
-  BFD_RELOC_ALPHA_USER_LITUSE_BASE,
-  BFD_RELOC_ALPHA_USER_LITUSE_BYTOFF,
-  BFD_RELOC_ALPHA_USER_LITUSE_JSR,
-  BFD_RELOC_ALPHA_USER_GPDISP,
-  BFD_RELOC_ALPHA_USER_GPRELHIGH,
-  BFD_RELOC_ALPHA_USER_GPRELLOW,
-
 /* The HINT relocation indicates a value that should be filled into the
 "hint" field of a jmp/jsr/ret instruction, for possible branch-
 prediction logic which may be provided on some processors. */
@@ -1967,6 +2104,11 @@ which is filled by the linker. */
 which is filled by the linker. */
   BFD_RELOC_ALPHA_CODEADDR,
 
+/* The GPREL_HI/LO relocations together form a 32-bit offset from the
+GP register. */
+  BFD_RELOC_ALPHA_GPREL_HI16,
+  BFD_RELOC_ALPHA_GPREL_LO16,
+
 /* Bits 27..2 of the relocation address shifted right 2 bits;
 simple reloc otherwise. */
   BFD_RELOC_MIPS_JMP,
@@ -2013,6 +2155,17 @@ to compensate for the borrow when the low bits are added. */
   BFD_RELOC_MIPS_GOT_PAGE,
   BFD_RELOC_MIPS_GOT_OFST,
   BFD_RELOC_MIPS_GOT_DISP,
+  BFD_RELOC_MIPS_SHIFT5,
+  BFD_RELOC_MIPS_SHIFT6,
+  BFD_RELOC_MIPS_INSERT_A,
+  BFD_RELOC_MIPS_INSERT_B,
+  BFD_RELOC_MIPS_DELETE,
+  BFD_RELOC_MIPS_HIGHEST,
+  BFD_RELOC_MIPS_HIGHER,
+  BFD_RELOC_MIPS_SCN_DISP,
+  BFD_RELOC_MIPS_REL16,
+  BFD_RELOC_MIPS_RELGOT,
+  BFD_RELOC_MIPS_JALR,
 
 
 /* i386/elf relocations */
@@ -2025,6 +2178,16 @@ to compensate for the borrow when the low bits are added. */
   BFD_RELOC_386_GOTOFF,
   BFD_RELOC_386_GOTPC,
 
+/* x86-64/elf relocations */
+  BFD_RELOC_X86_64_GOT32,
+  BFD_RELOC_X86_64_PLT32,
+  BFD_RELOC_X86_64_COPY,
+  BFD_RELOC_X86_64_GLOB_DAT,
+  BFD_RELOC_X86_64_JUMP_SLOT,
+  BFD_RELOC_X86_64_RELATIVE,
+  BFD_RELOC_X86_64_GOTPCREL,
+  BFD_RELOC_X86_64_32S,
+
 /* ns32k relocations */
   BFD_RELOC_NS32K_IMM_8,
   BFD_RELOC_NS32K_IMM_16,
@@ -2039,6 +2202,10 @@ to compensate for the borrow when the low bits are added. */
   BFD_RELOC_NS32K_DISP_16_PCREL,
   BFD_RELOC_NS32K_DISP_32_PCREL,
 
+/* PDP11 relocations */
+  BFD_RELOC_PDP11_DISP_8_PCREL,
+  BFD_RELOC_PDP11_DISP_6_PCREL,
+
 /* Picojava relocs.  Not all of these appear in object files. */
   BFD_RELOC_PJ_CODE_HI16,
   BFD_RELOC_PJ_CODE_LO16,
@@ -2078,6 +2245,29 @@ to compensate for the borrow when the low bits are added. */
   BFD_RELOC_PPC_EMB_RELST_HA,
   BFD_RELOC_PPC_EMB_BIT_FLD,
   BFD_RELOC_PPC_EMB_RELSDA,
+  BFD_RELOC_PPC64_HIGHER,
+  BFD_RELOC_PPC64_HIGHER_S,
+  BFD_RELOC_PPC64_HIGHEST,
+  BFD_RELOC_PPC64_HIGHEST_S,
+  BFD_RELOC_PPC64_TOC16_LO,
+  BFD_RELOC_PPC64_TOC16_HI,
+  BFD_RELOC_PPC64_TOC16_HA,
+  BFD_RELOC_PPC64_TOC,
+  BFD_RELOC_PPC64_PLTGOT16,
+  BFD_RELOC_PPC64_PLTGOT16_LO,
+  BFD_RELOC_PPC64_PLTGOT16_HI,
+  BFD_RELOC_PPC64_PLTGOT16_HA,
+  BFD_RELOC_PPC64_ADDR16_DS,
+  BFD_RELOC_PPC64_ADDR16_LO_DS,
+  BFD_RELOC_PPC64_GOT16_DS,
+  BFD_RELOC_PPC64_GOT16_LO_DS,
+  BFD_RELOC_PPC64_PLT16_LO_DS,
+  BFD_RELOC_PPC64_SECTOFF_DS,
+  BFD_RELOC_PPC64_SECTOFF_LO_DS,
+  BFD_RELOC_PPC64_TOC16_DS,
+  BFD_RELOC_PPC64_TOC16_LO_DS,
+  BFD_RELOC_PPC64_PLTGOT16_DS,
+  BFD_RELOC_PPC64_PLTGOT16_LO_DS,
 
 /* IBM 370/390 relocations */
   BFD_RELOC_I370_D12,
@@ -2151,6 +2341,11 @@ field in the instruction. */
   BFD_RELOC_SH_LABEL,
   BFD_RELOC_SH_LOOP_START,
   BFD_RELOC_SH_LOOP_END,
+  BFD_RELOC_SH_COPY,
+  BFD_RELOC_SH_GLOB_DAT,
+  BFD_RELOC_SH_JMP_SLOT,
+  BFD_RELOC_SH_RELATIVE,
+  BFD_RELOC_SH_GOTPC,
 
 /* Thumb 23-, 12- and 9-bit pc-relative branches.  The lowest bit must
 be zero and is not stored in the instruction. */
@@ -2158,7 +2353,7 @@ be zero and is not stored in the instruction. */
   BFD_RELOC_THUMB_PCREL_BRANCH12,
   BFD_RELOC_THUMB_PCREL_BRANCH23,
 
-/* Argonaut RISC Core (ARC) relocs.
+/* ARC Cores relocs.
 ARC 22 bit pc-relative branch.  The lowest two bits must be zero and are
 not stored in the instruction.  The high 20 bits are installed in bits 26
 through 7 of the instruction. */
@@ -2347,13 +2542,13 @@ significant 9 bits of the opcode. */
 /* This is an extended address 23-bit reloc for the tms320c54x. */
   BFD_RELOC_TIC54X_23,
 
-/* This is a 16-bit reloc for the tms320c54x, where the least 
-significant 16 bits of a 23-bit extended address are placed into 
+/* This is a 16-bit reloc for the tms320c54x, where the least
+significant 16 bits of a 23-bit extended address are placed into
 the opcode. */
   BFD_RELOC_TIC54X_16_OF_23,
 
 /* This is a reloc for the tms320c54x, where the most
-significant 7 bits of a 23-bit extended address are placed into 
+significant 7 bits of a 23-bit extended address are placed into
 the opcode. */
   BFD_RELOC_TIC54X_MS7_OF_23,
 
@@ -2464,6 +2659,57 @@ value of SUBI insn. */
 into 22 bits. */
   BFD_RELOC_AVR_CALL,
 
+/* Direct 12 bit. */
+  BFD_RELOC_390_12,
+
+/* 12 bit GOT offset. */
+  BFD_RELOC_390_GOT12,
+
+/* 32 bit PC relative PLT address. */
+  BFD_RELOC_390_PLT32,
+
+/* Copy symbol at runtime. */
+  BFD_RELOC_390_COPY,
+
+/* Create GOT entry. */
+  BFD_RELOC_390_GLOB_DAT,
+
+/* Create PLT entry. */
+  BFD_RELOC_390_JMP_SLOT,
+
+/* Adjust by program base. */
+  BFD_RELOC_390_RELATIVE,
+
+/* 32 bit PC relative offset to GOT. */
+  BFD_RELOC_390_GOTPC,
+
+/* 16 bit GOT offset. */
+  BFD_RELOC_390_GOT16,
+
+/* PC relative 16 bit shifted by 1. */
+  BFD_RELOC_390_PC16DBL,
+
+/* 16 bit PC rel. PLT shifted by 1. */
+  BFD_RELOC_390_PLT16DBL,
+
+/* PC relative 32 bit shifted by 1. */
+  BFD_RELOC_390_PC32DBL,
+
+/* 32 bit PC rel. PLT shifted by 1. */
+  BFD_RELOC_390_PLT32DBL,
+
+/* 32 bit PC rel. GOT shifted by 1. */
+  BFD_RELOC_390_GOTPCDBL,
+
+/* 64 bit GOT offset. */
+  BFD_RELOC_390_GOT64,
+
+/* 64 bit PC relative PLT address. */
+  BFD_RELOC_390_PLT64,
+
+/* 32 bit rel. offset to GOT entry. */
+  BFD_RELOC_390_GOTENT,
+
 /* These two relocations are used by the linker to determine which of
 the entries in a C++ virtual function table are actually used.  When
 the --gc-sections option is given, the linker will zero out the entries
@@ -2522,9 +2768,10 @@ this offset in the reloc's section offset. */
   BFD_RELOC_IA64_PCREL64LSB,
   BFD_RELOC_IA64_LTOFF_FPTR22,
   BFD_RELOC_IA64_LTOFF_FPTR64I,
+  BFD_RELOC_IA64_LTOFF_FPTR32MSB,
+  BFD_RELOC_IA64_LTOFF_FPTR32LSB,
   BFD_RELOC_IA64_LTOFF_FPTR64MSB,
   BFD_RELOC_IA64_LTOFF_FPTR64LSB,
-  BFD_RELOC_IA64_SEGBASE,
   BFD_RELOC_IA64_SEGREL32MSB,
   BFD_RELOC_IA64_SEGREL32LSB,
   BFD_RELOC_IA64_SEGREL64MSB,
@@ -2543,8 +2790,6 @@ this offset in the reloc's section offset. */
   BFD_RELOC_IA64_LTV64LSB,
   BFD_RELOC_IA64_IPLTMSB,
   BFD_RELOC_IA64_IPLTLSB,
-  BFD_RELOC_IA64_EPLTMSB,
-  BFD_RELOC_IA64_EPLTLSB,
   BFD_RELOC_IA64_COPY,
   BFD_RELOC_IA64_TPREL22,
   BFD_RELOC_IA64_TPREL64MSB,
@@ -2564,14 +2809,93 @@ This is the 8 bits low part of an absolute address. */
 /* Motorola 68HC11 reloc.
 This is the 3 bits of a value. */
   BFD_RELOC_M68HC11_3B,
+
+/* These relocs are only used within the CRIS assembler.  They are not
+(at present) written to any object files. */
+  BFD_RELOC_CRIS_BDISP8,
+  BFD_RELOC_CRIS_UNSIGNED_5,
+  BFD_RELOC_CRIS_SIGNED_6,
+  BFD_RELOC_CRIS_UNSIGNED_6,
+  BFD_RELOC_CRIS_UNSIGNED_4,
+
+/* Relocs used in ELF shared libraries for CRIS. */
+  BFD_RELOC_CRIS_COPY,
+  BFD_RELOC_CRIS_GLOB_DAT,
+  BFD_RELOC_CRIS_JUMP_SLOT,
+  BFD_RELOC_CRIS_RELATIVE,
+
+/* 32-bit offset to symbol-entry within GOT. */
+  BFD_RELOC_CRIS_32_GOT,
+
+/* 16-bit offset to symbol-entry within GOT. */
+  BFD_RELOC_CRIS_16_GOT,
+
+/* 32-bit offset to symbol-entry within GOT, with PLT handling. */
+  BFD_RELOC_CRIS_32_GOTPLT,
+
+/* 16-bit offset to symbol-entry within GOT, with PLT handling. */
+  BFD_RELOC_CRIS_16_GOTPLT,
+
+/* 32-bit offset to symbol, relative to GOT. */
+  BFD_RELOC_CRIS_32_GOTREL,
+
+/* 32-bit offset to symbol with PLT entry, relative to GOT. */
+  BFD_RELOC_CRIS_32_PLT_GOTREL,
+
+/* 32-bit offset to symbol with PLT entry, relative to this relocation. */
+  BFD_RELOC_CRIS_32_PLT_PCREL,
+
+/* Intel i860 Relocations. */
+  BFD_RELOC_860_COPY,
+  BFD_RELOC_860_GLOB_DAT,
+  BFD_RELOC_860_JUMP_SLOT,
+  BFD_RELOC_860_RELATIVE,
+  BFD_RELOC_860_PC26,
+  BFD_RELOC_860_PLT26,
+  BFD_RELOC_860_PC16,
+  BFD_RELOC_860_LOW0,
+  BFD_RELOC_860_SPLIT0,
+  BFD_RELOC_860_LOW1,
+  BFD_RELOC_860_SPLIT1,
+  BFD_RELOC_860_LOW2,
+  BFD_RELOC_860_SPLIT2,
+  BFD_RELOC_860_LOW3,
+  BFD_RELOC_860_LOGOT0,
+  BFD_RELOC_860_SPGOT0,
+  BFD_RELOC_860_LOGOT1,
+  BFD_RELOC_860_SPGOT1,
+  BFD_RELOC_860_LOGOTOFF0,
+  BFD_RELOC_860_SPGOTOFF0,
+  BFD_RELOC_860_LOGOTOFF1,
+  BFD_RELOC_860_SPGOTOFF1,
+  BFD_RELOC_860_LOGOTOFF2,
+  BFD_RELOC_860_LOGOTOFF3,
+  BFD_RELOC_860_LOPC,
+  BFD_RELOC_860_HIGHADJ,
+  BFD_RELOC_860_HAGOT,
+  BFD_RELOC_860_HAGOTOFF,
+  BFD_RELOC_860_HAPC,
+  BFD_RELOC_860_HIGH,
+  BFD_RELOC_860_HIGOT,
+  BFD_RELOC_860_HIGOTOFF,
+
+/* OpenRISC Relocations. */
+  BFD_RELOC_OPENRISC_ABS_26,
+  BFD_RELOC_OPENRISC_REL_26,
+
+/* H8 elf Relocations. */
+  BFD_RELOC_H8_DIR16A8,
+  BFD_RELOC_H8_DIR16R8,
+  BFD_RELOC_H8_DIR24A8,
+  BFD_RELOC_H8_DIR24R8,
+  BFD_RELOC_H8_DIR32A16,
   BFD_RELOC_UNUSED };
 typedef enum bfd_reloc_code_real bfd_reloc_code_real_type;
 reloc_howto_type *
-
-bfd_reloc_type_lookup  PARAMS ((bfd *abfd, bfd_reloc_code_real_type code));
+bfd_reloc_type_lookup PARAMS ((bfd *abfd, bfd_reloc_code_real_type code));
 
 const char *
-bfd_get_reloc_code_name  PARAMS ((bfd_reloc_code_real_type code));
+bfd_get_reloc_code_name PARAMS ((bfd_reloc_code_real_type code));
 
 
 typedef struct symbol_cache_entry
@@ -2590,7 +2914,7 @@ typedef struct symbol_cache_entry
 
        /* The text of the symbol. The name is left alone, and not copied; the
           application may not alter it. */
-  CONST char *name;
+  const char *name;
 
        /* The value of the symbol.  This really should be a union of a
           numeric value with a pointer, since some flags indicate that
@@ -2698,10 +3022,10 @@ typedef struct symbol_cache_entry
 } asymbol;
 #define bfd_get_symtab_upper_bound(abfd) \
      BFD_SEND (abfd, _bfd_get_symtab_upper_bound, (abfd))
-boolean 
+boolean
 bfd_is_local_label PARAMS ((bfd *abfd, asymbol *sym));
 
-boolean 
+boolean
 bfd_is_local_label_name PARAMS ((bfd *abfd, const char *name));
 
 #define bfd_is_local_label_name(abfd, name) \
@@ -2709,35 +3033,35 @@ bfd_is_local_label_name PARAMS ((bfd *abfd, const char *name));
 #define bfd_canonicalize_symtab(abfd, location) \
      BFD_SEND (abfd, _bfd_canonicalize_symtab,\
                   (abfd, location))
-boolean 
-bfd_set_symtab  PARAMS ((bfd *abfd, asymbol **location, unsigned int count));
+boolean
+bfd_set_symtab PARAMS ((bfd *abfd, asymbol **location, unsigned int count));
 
-void 
-bfd_print_symbol_vandf PARAMS ((PTR file, asymbol *symbol));
+void
+bfd_print_symbol_vandf PARAMS ((bfd *abfd, PTR file, asymbol *symbol));
 
 #define bfd_make_empty_symbol(abfd) \
      BFD_SEND (abfd, _bfd_make_empty_symbol, (abfd))
 #define bfd_make_debug_symbol(abfd,ptr,size) \
         BFD_SEND (abfd, _bfd_make_debug_symbol, (abfd, ptr, size))
-int 
+int
 bfd_decode_symclass PARAMS ((asymbol *symbol));
 
-boolean 
-bfd_is_undefined_symclass  PARAMS ((int symclass));
+boolean
+bfd_is_undefined_symclass PARAMS ((int symclass));
 
-void 
+void
 bfd_symbol_info PARAMS ((asymbol *symbol, symbol_info *ret));
 
-boolean 
+boolean
 bfd_copy_private_symbol_data PARAMS ((bfd *ibfd, asymbol *isym, bfd *obfd, asymbol *osym));
 
 #define bfd_copy_private_symbol_data(ibfd, isymbol, obfd, osymbol) \
      BFD_SEND (obfd, _bfd_copy_private_symbol_data, \
                (ibfd, isymbol, obfd, osymbol))
-struct _bfd 
+struct _bfd
 {
     /* The filename the application opened the BFD with.  */
-    CONST char *filename;                
+    const char *filename;
 
     /* A pointer to the target jump table.             */
     const struct bfd_target *xvec;
@@ -2770,7 +3094,7 @@ struct _bfd
     /* When a file is closed by the caching routines, BFD retains
        state information on the file here: */
 
-    file_ptr where;              
+    ufile_ptr where;
 
     /* and here: (``once'' means at least once) */
 
@@ -2783,7 +3107,7 @@ struct _bfd
 
     /* File modified time, if mtime_set is true: */
 
-    long mtime;          
+    long mtime;
 
     /* Reserved for an unimplemented file locking extension.*/
 
@@ -2802,13 +3126,13 @@ struct _bfd
 
     /* Format_specific flags*/
 
-    flagword flags;              
+    flagword flags;
 
     /* Currently my_archive is tested before adding origin to
        anything. I believe that this can become always an add of
        origin, with origin set to 0 for non archive files.   */
 
-    file_ptr origin;             
+    ufile_ptr origin;
 
     /* Remember when output has begun, to stop strange things
        from happening. */
@@ -2820,7 +3144,7 @@ struct _bfd
     /* The number of sections */
     unsigned int section_count;
 
-    /* Stuff only useful for object files: 
+    /* Stuff only useful for object files:
        The start address. */
     bfd_vma start_address;
 
@@ -2828,17 +3152,17 @@ struct _bfd
     unsigned int symcount;
 
     /* Symbol table for output BFD (with symcount entries) */
-    struct symbol_cache_entry  **outsymbols;             
+    struct symbol_cache_entry  **outsymbols;
 
     /* Pointer to structure which contains architecture information*/
     const struct bfd_arch_info *arch_info;
 
     /* Stuff only useful for archives:*/
-    PTR arelt_data;              
+    PTR arelt_data;
     struct _bfd *my_archive;     /* The containing archive BFD.  */
     struct _bfd *next;           /* The next BFD in the archive.  */
     struct _bfd *archive_head;   /* The first BFD in the archive.  */
-    boolean has_armap;           
+    boolean has_armap;
 
     /* A chain of BFD structures involved in a link.  */
     struct _bfd *link_next;
@@ -2849,7 +3173,7 @@ struct _bfd
 
     /* Used by the back end to hold private data. */
 
-    union 
+    union
       {
       struct aout_data_struct *aout_data;
       struct artdata *aout_ar_data;
@@ -2881,7 +3205,7 @@ struct _bfd
       struct netbsd_core_struct *netbsd_core_data;
       PTR any;
       } tdata;
-  
+
     /* Used by the application to hold private data*/
     PTR usrdata;
 
@@ -2897,6 +3221,7 @@ typedef enum bfd_error
   bfd_error_system_call,
   bfd_error_invalid_target,
   bfd_error_wrong_format,
+  bfd_error_wrong_object_format,
   bfd_error_invalid_operation,
   bfd_error_no_memory,
   bfd_error_no_symbols,
@@ -2914,85 +3239,86 @@ typedef enum bfd_error
   bfd_error_invalid_error_code
 } bfd_error_type;
 
-bfd_error_type 
-bfd_get_error  PARAMS ((void));
+bfd_error_type
+bfd_get_error PARAMS ((void));
 
-void 
-bfd_set_error  PARAMS ((bfd_error_type error_tag));
+void
+bfd_set_error PARAMS ((bfd_error_type error_tag));
 
-CONST char *
-bfd_errmsg  PARAMS ((bfd_error_type error_tag));
+const char *
+bfd_errmsg PARAMS ((bfd_error_type error_tag));
 
-void 
-bfd_perror  PARAMS ((CONST char *message));
+void
+bfd_perror PARAMS ((const char *message));
 
 typedef void (*bfd_error_handler_type) PARAMS ((const char *, ...));
 
-bfd_error_handler_type 
-bfd_set_error_handler  PARAMS ((bfd_error_handler_type));
+bfd_error_handler_type
+bfd_set_error_handler PARAMS ((bfd_error_handler_type));
 
-void 
-bfd_set_error_program_name  PARAMS ((const char *));
+void
+bfd_set_error_program_name PARAMS ((const char *));
 
-bfd_error_handler_type 
-bfd_get_error_handler  PARAMS ((void));
+bfd_error_handler_type
+bfd_get_error_handler PARAMS ((void));
 
-long 
+const char *
+bfd_archive_filename PARAMS ((bfd *));
+
+long
 bfd_get_reloc_upper_bound PARAMS ((bfd *abfd, asection *sect));
 
-long 
-bfd_canonicalize_reloc
- PARAMS ((bfd *abfd,
+long
+bfd_canonicalize_reloc PARAMS ((bfd *abfd,
     asection *sec,
     arelent **loc,
     asymbol **syms));
 
-void 
-bfd_set_reloc
- PARAMS ((bfd *abfd, asection *sec, arelent **rel, unsigned int count)
+void
+bfd_set_reloc PARAMS ((bfd *abfd, asection *sec, arelent **rel, unsigned int count)
     
     );
 
-boolean 
+boolean
 bfd_set_file_flags PARAMS ((bfd *abfd, flagword flags));
 
-int 
-bfd_get_arch_size  PARAMS ((bfd *abfd));
+int
+bfd_get_arch_size PARAMS ((bfd *abfd));
 
-int 
-bfd_get_sign_extend_vma  PARAMS ((bfd *abfd));
+int
+bfd_get_sign_extend_vma PARAMS ((bfd *abfd));
 
-boolean 
+boolean
 bfd_set_start_address PARAMS ((bfd *abfd, bfd_vma vma));
 
-long 
+long
 bfd_get_mtime PARAMS ((bfd *abfd));
 
-long 
+long
 bfd_get_size PARAMS ((bfd *abfd));
 
-int 
+unsigned int
 bfd_get_gp_size PARAMS ((bfd *abfd));
 
-void 
-bfd_set_gp_size PARAMS ((bfd *abfd, int i));
+void
+bfd_set_gp_size PARAMS ((bfd *abfd, unsigned int i));
 
-bfd_vma 
-bfd_scan_vma PARAMS ((CONST char *string, CONST char **end, int base));
+bfd_vma
+bfd_scan_vma PARAMS ((const char *string, const char **end, int base));
 
-boolean 
+boolean
 bfd_copy_private_bfd_data PARAMS ((bfd *ibfd, bfd *obfd));
 
 #define bfd_copy_private_bfd_data(ibfd, obfd) \
      BFD_SEND (obfd, _bfd_copy_private_bfd_data, \
                (ibfd, obfd))
-boolean 
+boolean
 bfd_merge_private_bfd_data PARAMS ((bfd *ibfd, bfd *obfd));
 
 #define bfd_merge_private_bfd_data(ibfd, obfd) \
      BFD_SEND (obfd, _bfd_merge_private_bfd_data, \
                (ibfd, obfd))
-boolean 
+boolean
 bfd_set_private_flags PARAMS ((bfd *abfd, flagword flags));
 
 #define bfd_set_private_flags(abfd, flags) \
@@ -3030,6 +3356,9 @@ bfd_set_private_flags PARAMS ((bfd *abfd, flagword flags));
 #define bfd_gc_sections(abfd, link_info) \
        BFD_SEND (abfd, _bfd_gc_sections, (abfd, link_info))
 
+#define bfd_merge_sections(abfd, link_info) \
+       BFD_SEND (abfd, _bfd_merge_sections, (abfd, link_info))
+
 #define bfd_link_hash_table_create(abfd) \
        BFD_SEND (abfd, _bfd_link_hash_table_create, (abfd))
 
@@ -3062,24 +3391,26 @@ extern bfd_byte *bfd_get_relocated_section_contents
                  struct bfd_link_order *, bfd_byte *,
                  boolean, asymbol **));
 
-symindex 
+boolean
+bfd_alt_mach_code PARAMS ((bfd *abfd, int index));
+
+symindex
 bfd_get_next_mapent PARAMS ((bfd *abfd, symindex previous, carsym **sym));
 
-boolean 
+boolean
 bfd_set_archive_head PARAMS ((bfd *output, bfd *new_head));
 
 bfd *
 bfd_openr_next_archived_file PARAMS ((bfd *archive, bfd *previous));
 
-CONST char *
+const char *
 bfd_core_file_failing_command PARAMS ((bfd *abfd));
 
-int 
+int
 bfd_core_file_failing_signal PARAMS ((bfd *abfd));
 
-boolean 
-core_file_matches_executable_p
- PARAMS ((bfd *core_bfd, bfd *exec_bfd));
+boolean
+core_file_matches_executable_p PARAMS ((bfd *core_bfd, bfd *exec_bfd));
 
 #define BFD_SEND(bfd, message, arglist) \
                ((*((bfd)->xvec->message)) arglist)
@@ -3092,13 +3423,13 @@ core_file_matches_executable_p
     (bfd_assert (__FILE__,__LINE__), NULL))
 #endif
 #define BFD_SEND_FMT(bfd, message, arglist) \
-            (((bfd)->xvec->message[(int)((bfd)->format)]) arglist)
+            (((bfd)->xvec->message[(int) ((bfd)->format)]) arglist)
 
 #ifdef DEBUG_BFD_SEND
 #undef BFD_SEND_FMT
 #define BFD_SEND_FMT(bfd, message, arglist) \
   (((bfd) && (bfd)->xvec && (bfd)->xvec->message) ? \
-   (((bfd)->xvec->message[(int)((bfd)->format)]) arglist) : \
+   (((bfd)->xvec->message[(int) ((bfd)->format)]) arglist) : \
    (bfd_assert (__FILE__,__LINE__), NULL))
 #endif
 enum bfd_flavour {
@@ -3133,32 +3464,32 @@ typedef struct bfd_target
   enum bfd_flavour flavour;
   enum bfd_endian byteorder;
   enum bfd_endian header_byteorder;
-  flagword object_flags;       
+  flagword object_flags;
   flagword section_flags;
   char symbol_leading_char;
-  char ar_pad_char;            
+  char ar_pad_char;
   unsigned short ar_max_namelen;
-  bfd_vma      (*bfd_getx64) PARAMS ((const bfd_byte *));
+  bfd_vma        (*bfd_getx64) PARAMS ((const bfd_byte *));
   bfd_signed_vma (*bfd_getx_signed_64) PARAMS ((const bfd_byte *));
-  void         (*bfd_putx64) PARAMS ((bfd_vma, bfd_byte *));
-  bfd_vma      (*bfd_getx32) PARAMS ((const bfd_byte *));
+  void           (*bfd_putx64) PARAMS ((bfd_vma, bfd_byte *));
+  bfd_vma        (*bfd_getx32) PARAMS ((const bfd_byte *));
   bfd_signed_vma (*bfd_getx_signed_32) PARAMS ((const bfd_byte *));
-  void         (*bfd_putx32) PARAMS ((bfd_vma, bfd_byte *));
-  bfd_vma      (*bfd_getx16) PARAMS ((const bfd_byte *));
+  void           (*bfd_putx32) PARAMS ((bfd_vma, bfd_byte *));
+  bfd_vma        (*bfd_getx16) PARAMS ((const bfd_byte *));
   bfd_signed_vma (*bfd_getx_signed_16) PARAMS ((const bfd_byte *));
-  void         (*bfd_putx16) PARAMS ((bfd_vma, bfd_byte *));
-  bfd_vma      (*bfd_h_getx64) PARAMS ((const bfd_byte *));
+  void           (*bfd_putx16) PARAMS ((bfd_vma, bfd_byte *));
+  bfd_vma        (*bfd_h_getx64) PARAMS ((const bfd_byte *));
   bfd_signed_vma (*bfd_h_getx_signed_64) PARAMS ((const bfd_byte *));
-  void         (*bfd_h_putx64) PARAMS ((bfd_vma, bfd_byte *));
-  bfd_vma      (*bfd_h_getx32) PARAMS ((const bfd_byte *));
+  void           (*bfd_h_putx64) PARAMS ((bfd_vma, bfd_byte *));
+  bfd_vma        (*bfd_h_getx32) PARAMS ((const bfd_byte *));
   bfd_signed_vma (*bfd_h_getx_signed_32) PARAMS ((const bfd_byte *));
-  void         (*bfd_h_putx32) PARAMS ((bfd_vma, bfd_byte *));
-  bfd_vma      (*bfd_h_getx16) PARAMS ((const bfd_byte *));
+  void           (*bfd_h_putx32) PARAMS ((bfd_vma, bfd_byte *));
+  bfd_vma        (*bfd_h_getx16) PARAMS ((const bfd_byte *));
   bfd_signed_vma (*bfd_h_getx_signed_16) PARAMS ((const bfd_byte *));
-  void         (*bfd_h_putx16) PARAMS ((bfd_vma, bfd_byte *));
+  void           (*bfd_h_putx16) PARAMS ((bfd_vma, bfd_byte *));
   const struct bfd_target *(*_bfd_check_format[bfd_type_end]) PARAMS ((bfd *));
-  boolean             (*_bfd_set_format[bfd_type_end]) PARAMS ((bfd *));
-  boolean             (*_bfd_write_contents[bfd_type_end]) PARAMS ((bfd *));
+  boolean  (*_bfd_set_format[bfd_type_end]) PARAMS ((bfd *));
+  boolean  (*_bfd_write_contents[bfd_type_end]) PARAMS ((bfd *));
 
   /* Generic entry points.  */
 #define BFD_JUMP_TABLE_GENERIC(NAME)\
@@ -3169,17 +3500,16 @@ CAT(NAME,_get_section_contents),\
 CAT(NAME,_get_section_contents_in_window)
 
   /* Called when the BFD is being closed to do any necessary cleanup.  */
-  boolean       (*_close_and_cleanup) PARAMS ((bfd *));
+  boolean  (*_close_and_cleanup) PARAMS ((bfd *));
   /* Ask the BFD to free all cached information.  */
-  boolean (*_bfd_free_cached_info) PARAMS ((bfd *));
+  boolean  (*_bfd_free_cached_info) PARAMS ((bfd *));
   /* Called when a new section is created.  */
-  boolean       (*_new_section_hook) PARAMS ((bfd *, sec_ptr));
+  boolean  (*_new_section_hook) PARAMS ((bfd *, sec_ptr));
   /* Read the contents of a section.  */
-  boolean       (*_bfd_get_section_contents) PARAMS ((bfd *, sec_ptr, PTR, 
-                                            file_ptr, bfd_size_type));
-  boolean       (*_bfd_get_section_contents_in_window)
-                          PARAMS ((bfd *, sec_ptr, bfd_window *,
-                                   file_ptr, bfd_size_type));
+  boolean  (*_bfd_get_section_contents) PARAMS ((bfd *, sec_ptr, PTR,
+                                                 file_ptr, bfd_size_type));
+  boolean  (*_bfd_get_section_contents_in_window)
+    PARAMS ((bfd *, sec_ptr, bfd_window *, file_ptr, bfd_size_type));
 
   /* Entry points to copy private data.  */
 #define BFD_JUMP_TABLE_COPY(NAME)\
@@ -3191,23 +3521,23 @@ CAT(NAME,_bfd_set_private_flags),\
 CAT(NAME,_bfd_print_private_bfd_data)\
   /* Called to copy BFD general private data from one object file
      to another.  */
-  boolean       (*_bfd_copy_private_bfd_data) PARAMS ((bfd *, bfd *));
+  boolean  (*_bfd_copy_private_bfd_data) PARAMS ((bfd *, bfd *));
   /* Called to merge BFD general private data from one object file
      to a common output file when linking.  */
-  boolean       (*_bfd_merge_private_bfd_data) PARAMS ((bfd *, bfd *));
+  boolean  (*_bfd_merge_private_bfd_data) PARAMS ((bfd *, bfd *));
   /* Called to copy BFD private section data from one object file
      to another.  */
-  boolean       (*_bfd_copy_private_section_data) PARAMS ((bfd *, sec_ptr,
-                                                       bfd *, sec_ptr));
-  /* Called to copy BFD private symbol data from one symbol 
+  boolean  (*_bfd_copy_private_section_data) PARAMS ((bfd *, sec_ptr,
+                                                      bfd *, sec_ptr));
+  /* Called to copy BFD private symbol data from one symbol
      to another.  */
-  boolean       (*_bfd_copy_private_symbol_data) PARAMS ((bfd *, asymbol *,
-                                                          bfd *, asymbol *));
+  boolean  (*_bfd_copy_private_symbol_data) PARAMS ((bfd *, asymbol *,
+                                                     bfd *, asymbol *));
   /* Called to set private backend flags */
-  boolean       (*_bfd_set_private_flags) PARAMS ((bfd *, flagword));
+  boolean  (*_bfd_set_private_flags) PARAMS ((bfd *, flagword));
 
   /* Called to print private BFD data */
-  boolean       (*_bfd_print_private_bfd_data) PARAMS ((bfd *, PTR));
+  boolean  (*_bfd_print_private_bfd_data) PARAMS ((bfd *, PTR));
 
   /* Core file entry points.  */
 #define BFD_JUMP_TABLE_CORE(NAME)\
@@ -3233,15 +3563,12 @@ CAT(NAME,_update_armap_timestamp)
   boolean  (*_bfd_slurp_armap) PARAMS ((bfd *));
   boolean  (*_bfd_slurp_extended_name_table) PARAMS ((bfd *));
   boolean  (*_bfd_construct_extended_name_table)
-             PARAMS ((bfd *, char **, bfd_size_type *, const char **));
-  void     (*_bfd_truncate_arname) PARAMS ((bfd *, CONST char *, char *));
-  boolean  (*write_armap) PARAMS ((bfd *arch, 
-                              unsigned int elength,
-                              struct orl *map,
-                              unsigned int orl_count, 
-                              int stridx));
-  PTR (*_bfd_read_ar_hdr_fn) PARAMS ((bfd *));
-  bfd *    (*openr_next_archived_file) PARAMS ((bfd *arch, bfd *prev));
+    PARAMS ((bfd *, char **, bfd_size_type *, const char **));
+  void     (*_bfd_truncate_arname) PARAMS ((bfd *, const char *, char *));
+  boolean  (*write_armap)
+    PARAMS ((bfd *, unsigned int, struct orl *, unsigned int, int));
+  PTR      (*_bfd_read_ar_hdr_fn) PARAMS ((bfd *));
+  bfd *    (*openr_next_archived_file) PARAMS ((bfd *, bfd *));
 #define bfd_get_elt_at_index(b,i) BFD_SEND(b, _bfd_get_elt_at_index, (b,i))
   bfd *    (*_bfd_get_elt_at_index) PARAMS ((bfd *, symindex));
   int      (*_bfd_stat_arch_elt) PARAMS ((bfd *, struct stat *));
@@ -3260,37 +3587,34 @@ CAT(NAME,_find_nearest_line),\
 CAT(NAME,_bfd_make_debug_symbol),\
 CAT(NAME,_read_minisymbols),\
 CAT(NAME,_minisymbol_to_symbol)
-  long  (*_bfd_get_symtab_upper_bound) PARAMS ((bfd *));
-  long  (*_bfd_canonicalize_symtab) PARAMS ((bfd *,
-                                             struct symbol_cache_entry **));
-  struct symbol_cache_entry  *
-                (*_bfd_make_empty_symbol) PARAMS ((bfd *));
-  void          (*_bfd_print_symbol) PARAMS ((bfd *, PTR,
-                                      struct symbol_cache_entry *,
-                                      bfd_print_symbol_type));
+  long     (*_bfd_get_symtab_upper_bound) PARAMS ((bfd *));
+  long     (*_bfd_canonicalize_symtab) PARAMS ((bfd *,
+                                                struct symbol_cache_entry **));
+  struct symbol_cache_entry *
+           (*_bfd_make_empty_symbol) PARAMS ((bfd *));
+  void     (*_bfd_print_symbol) PARAMS ((bfd *, PTR,
+                                         struct symbol_cache_entry *,
+                                         bfd_print_symbol_type));
 #define bfd_print_symbol(b,p,s,e) BFD_SEND(b, _bfd_print_symbol, (b,p,s,e))
-  void          (*_bfd_get_symbol_info) PARAMS ((bfd *,
-                                      struct symbol_cache_entry *,
-                                      symbol_info *));
+  void     (*_bfd_get_symbol_info) PARAMS ((bfd *,
+                                            struct symbol_cache_entry *,
+                                            symbol_info *));
 #define bfd_get_symbol_info(b,p,e) BFD_SEND(b, _bfd_get_symbol_info, (b,p,e))
-  boolean       (*_bfd_is_local_label_name) PARAMS ((bfd *, const char *));
+  boolean  (*_bfd_is_local_label_name) PARAMS ((bfd *, const char *));
 
-  alent *    (*_get_lineno) PARAMS ((bfd *, struct symbol_cache_entry *));
-  boolean    (*_bfd_find_nearest_line) PARAMS ((bfd *abfd,
-                    struct sec *section, struct symbol_cache_entry **symbols,
-                    bfd_vma offset, CONST char **file, CONST char **func,
-                    unsigned int *line));
+  alent *  (*_get_lineno) PARAMS ((bfd *, struct symbol_cache_entry *));
+  boolean  (*_bfd_find_nearest_line)
+    PARAMS ((bfd *, struct sec *, struct symbol_cache_entry **, bfd_vma,
+             const char **, const char **, unsigned int *));
  /* Back-door to allow format-aware applications to create debug symbols
     while using BFD for everything else.  Currently used by the assembler
     when creating COFF files.  */
-  asymbol *  (*_bfd_make_debug_symbol) PARAMS ((
-       bfd *abfd,
-       void *ptr,
-       unsigned long size));
+  asymbol *(*_bfd_make_debug_symbol) PARAMS ((bfd *, void *,
+                                              unsigned long size));
 #define bfd_read_minisymbols(b, d, m, s) \
   BFD_SEND (b, _read_minisymbols, (b, d, m, s))
-  long  (*_read_minisymbols) PARAMS ((bfd *, boolean, PTR *,
-                                      unsigned int *));
+  long     (*_read_minisymbols) PARAMS ((bfd *, boolean, PTR *,
+                                         unsigned int *));
 #define bfd_minisymbol_to_symbol(b, d, m, f) \
   BFD_SEND (b, _minisymbol_to_symbol, (b, d, m, f))
   asymbol *(*_minisymbol_to_symbol) PARAMS ((bfd *, boolean, const PTR,
@@ -3301,22 +3625,21 @@ CAT(NAME,_minisymbol_to_symbol)
 CAT(NAME,_get_reloc_upper_bound),\
 CAT(NAME,_canonicalize_reloc),\
 CAT(NAME,_bfd_reloc_type_lookup)
-  long  (*_get_reloc_upper_bound) PARAMS ((bfd *, sec_ptr));
-  long  (*_bfd_canonicalize_reloc) PARAMS ((bfd *, sec_ptr, arelent **,
-                                            struct symbol_cache_entry **));
+  long     (*_get_reloc_upper_bound) PARAMS ((bfd *, sec_ptr));
+  long     (*_bfd_canonicalize_reloc) PARAMS ((bfd *, sec_ptr, arelent **,
+                                               struct symbol_cache_entry **));
   /* See documentation on reloc types.  */
   reloc_howto_type *
-       (*reloc_type_lookup) PARAMS ((bfd *abfd,
-                                     bfd_reloc_code_real_type code));
+           (*reloc_type_lookup) PARAMS ((bfd *, bfd_reloc_code_real_type));
 
   /* Routines used when writing an object file.  */
 #define BFD_JUMP_TABLE_WRITE(NAME)\
 CAT(NAME,_set_arch_mach),\
 CAT(NAME,_set_section_contents)
-  boolean    (*_bfd_set_arch_mach) PARAMS ((bfd *, enum bfd_architecture,
-                    unsigned long));
-  boolean       (*_bfd_set_section_contents) PARAMS ((bfd *, sec_ptr, PTR,
-                                            file_ptr, bfd_size_type));
+  boolean  (*_bfd_set_arch_mach) PARAMS ((bfd *, enum bfd_architecture,
+                                          unsigned long));
+  boolean  (*_bfd_set_section_contents) PARAMS ((bfd *, sec_ptr, PTR,
+                                                 file_ptr, bfd_size_type));
 
   /* Routines used by the linker.  */
 #define BFD_JUMP_TABLE_LINK(NAME)\
@@ -3327,32 +3650,35 @@ CAT(NAME,_bfd_link_hash_table_create),\
 CAT(NAME,_bfd_link_add_symbols),\
 CAT(NAME,_bfd_final_link),\
 CAT(NAME,_bfd_link_split_section),\
-CAT(NAME,_bfd_gc_sections)
-  int        (*_bfd_sizeof_headers) PARAMS ((bfd *, boolean));
-  bfd_byte * (*_bfd_get_relocated_section_contents) PARAMS ((bfd *,
-                    struct bfd_link_info *, struct bfd_link_order *,
-                    bfd_byte *data, boolean relocateable,
-                    struct symbol_cache_entry **));
+CAT(NAME,_bfd_gc_sections),\
+CAT(NAME,_bfd_merge_sections)
+  int      (*_bfd_sizeof_headers) PARAMS ((bfd *, boolean));
+  bfd_byte *(*_bfd_get_relocated_section_contents)
+    PARAMS ((bfd *, struct bfd_link_info *, struct bfd_link_order *,
+             bfd_byte *, boolean, struct symbol_cache_entry **));
 
-  boolean    (*_bfd_relax_section) PARAMS ((bfd *, struct sec *,
-                    struct bfd_link_info *, boolean *again));
+  boolean  (*_bfd_relax_section)
+    PARAMS ((bfd *, struct sec *, struct bfd_link_info *, boolean *));
 
   /* Create a hash table for the linker.  Different backends store
      different information in this table.  */
   struct bfd_link_hash_table *(*_bfd_link_hash_table_create) PARAMS ((bfd *));
 
   /* Add symbols from this object file into the hash table.  */
-  boolean (*_bfd_link_add_symbols) PARAMS ((bfd *, struct bfd_link_info *));
+  boolean  (*_bfd_link_add_symbols) PARAMS ((bfd *, struct bfd_link_info *));
 
   /* Do a link based on the link_order structures attached to each
      section of the BFD.  */
-  boolean (*_bfd_final_link) PARAMS ((bfd *, struct bfd_link_info *));
+  boolean  (*_bfd_final_link) PARAMS ((bfd *, struct bfd_link_info *));
 
   /* Should this section be split up into smaller pieces during linking.  */
-  boolean (*_bfd_link_split_section) PARAMS ((bfd *, struct sec *));
+  boolean  (*_bfd_link_split_section) PARAMS ((bfd *, struct sec *));
 
   /* Remove sections that are not referenced from the output.  */
-  boolean (*_bfd_gc_sections) PARAMS ((bfd *, struct bfd_link_info *));
+  boolean  (*_bfd_gc_sections) PARAMS ((bfd *, struct bfd_link_info *));
+
+  /* Attempt to merge SEC_MERGE sections.  */
+  boolean  (*_bfd_merge_sections) PARAMS ((bfd *, struct bfd_link_info *));
 
   /* Routines to handle dynamic symbols and relocs.  */
 #define BFD_JUMP_TABLE_DYNAMIC(NAME)\
@@ -3361,44 +3687,44 @@ CAT(NAME,_canonicalize_dynamic_symtab),\
 CAT(NAME,_get_dynamic_reloc_upper_bound),\
 CAT(NAME,_canonicalize_dynamic_reloc)
   /* Get the amount of memory required to hold the dynamic symbols. */
-  long  (*_bfd_get_dynamic_symtab_upper_bound) PARAMS ((bfd *));
+  long     (*_bfd_get_dynamic_symtab_upper_bound) PARAMS ((bfd *));
   /* Read in the dynamic symbols.  */
-  long  (*_bfd_canonicalize_dynamic_symtab)
+  long     (*_bfd_canonicalize_dynamic_symtab)
     PARAMS ((bfd *, struct symbol_cache_entry **));
   /* Get the amount of memory required to hold the dynamic relocs.  */
-  long  (*_bfd_get_dynamic_reloc_upper_bound) PARAMS ((bfd *));
+  long     (*_bfd_get_dynamic_reloc_upper_bound) PARAMS ((bfd *));
   /* Read in the dynamic relocs.  */
-  long  (*_bfd_canonicalize_dynamic_reloc)
+  long     (*_bfd_canonicalize_dynamic_reloc)
     PARAMS ((bfd *, arelent **, struct symbol_cache_entry **));
 
- /* Opposite endian version of this target.  */  
+ /* Opposite endian version of this target.  */
  const struct bfd_target * alternative_target;
+
  PTR backend_data;
+
 } bfd_target;
-boolean 
-bfd_set_default_target  PARAMS ((const char *name));
+boolean
+bfd_set_default_target PARAMS ((const char *name));
 
 const bfd_target *
-bfd_find_target PARAMS ((CONST char *target_name, bfd *abfd));
+bfd_find_target PARAMS ((const char *target_name, bfd *abfd));
 
 const char **
 bfd_target_list PARAMS ((void));
 
-const bfd_target * 
-bfd_search_for_target  PARAMS ((int (* search_func)(const bfd_target *, void *), void *));
+const bfd_target *
+bfd_search_for_target PARAMS ((int (* search_func) (const bfd_target *, void *), void *));
 
-boolean 
+boolean
 bfd_check_format PARAMS ((bfd *abfd, bfd_format format));
 
-boolean 
+boolean
 bfd_check_format_matches PARAMS ((bfd *abfd, bfd_format format, char ***matching));
 
-boolean 
+boolean
 bfd_set_format PARAMS ((bfd *abfd, bfd_format format));
 
-CONST char *
+const char *
 bfd_format_string PARAMS ((bfd_format format));
 
 #ifdef __cplusplus
This page took 0.055866 seconds and 4 git commands to generate.