(Lay some groundwork for TIc80 port that will be filled in incrementally.)
[deliverable/binutils-gdb.git] / bfd / bfd-in2.h
index b95c1a313a5d1611eea8abda4ce34601debff673..d38f1de961ed767a1a576068fdc3d019d170f28d 100644 (file)
@@ -1,5 +1,5 @@
 /* Main header file for the bfd library -- portable access to object files.
-   Copyright 1990, 1991, 1992, 1993, 1994, 1995 Free Software Foundation, Inc.
+   Copyright 1990, 91, 92, 93, 94, 95, 1996 Free Software Foundation, Inc.
    Contributed by Cygnus Support.
 
 ** NOTE: bfd.h and bfd-in2.h are GENERATED files.  Don't change them;
@@ -53,8 +53,12 @@ extern "C" {
 
 /* These two lines get substitutions done by commands in Makefile.in.  */
 #define BFD_VERSION  "@VERSION@"
-#define BFD_ARCH_SIZE @WORDSIZE@
+#define BFD_ARCH_SIZE @wordsize@
 #define BFD_HOST_64BIT_LONG @BFD_HOST_64BIT_LONG@
+#if @BFD_HOST_64_BIT_DEFINED@
+#define BFD_HOST_64_BIT @BFD_HOST_64_BIT@
+#define BFD_HOST_U_64_BIT @BFD_HOST_U_64_BIT@
+#endif
 
 #if BFD_ARCH_SIZE >= 64
 #define BFD64
@@ -88,6 +92,11 @@ typedef struct _bfd bfd;
 #if defined (__GNUG__) && (__GNUC_MINOR__ > 5)
 #define TRUE_FALSE_ALREADY_DEFINED
 #endif
+#ifdef MPW
+/* Pre-emptive strike - get the file with the enum. */
+#include <Types.h>
+#define TRUE_FALSE_ALREADY_DEFINED
+#endif /* MPW */
 #ifndef TRUE_FALSE_ALREADY_DEFINED
 typedef enum bfd_boolean {false, true} boolean;
 #define BFD_TRUE_FALSE
@@ -109,25 +118,29 @@ 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
-   use gcc's "long long" type.  Otherwise, the compilation will fail
-   if 64-bit targets are requested.  */
+   use gcc's "long long" type.  Otherwise, BFD_HOST_64_BIT must be
+   defined above.  */
 
 #ifdef BFD64
 
 #ifndef BFD_HOST_64_BIT
 #if BFD_HOST_64BIT_LONG
 #define BFD_HOST_64_BIT long
+#define BFD_HOST_U_64_BIT unsigned long
 #else
 #ifdef __GNUC__
 #define BFD_HOST_64_BIT long long
-#endif /* defined (__GNUC__) */
+#define BFD_HOST_U_64_BIT unsigned long long
+#else /* ! defined (__GNUC__) */
+ #error No 64 bit integer type available
+#endif /* ! defined (__GNUC__) */
 #endif /* ! BFD_HOST_64BIT_LONG */
 #endif /* ! defined (BFD_HOST_64_BIT) */
 
-typedef unsigned BFD_HOST_64_BIT bfd_vma;
+typedef BFD_HOST_U_64_BIT bfd_vma;
 typedef BFD_HOST_64_BIT bfd_signed_vma;
-typedef unsigned BFD_HOST_64_BIT bfd_size_type;
-typedef unsigned BFD_HOST_64_BIT symvalue;
+typedef BFD_HOST_U_64_BIT bfd_size_type;
+typedef BFD_HOST_U_64_BIT symvalue;
 
 #ifndef fprintf_vma
 #if BFD_HOST_64BIT_LONG
@@ -186,7 +199,7 @@ typedef enum bfd_format {
    to another, and are not necessarily correct).  */
 
 /* No flags.  */
-#define NO_FLAGS       0x00
+#define BFD_NO_FLAGS           0x00
 
 /* BFD contains relocation entries.  */
 #define HAS_RELOC      0x01
@@ -230,6 +243,10 @@ typedef enum bfd_format {
    writing out an a.out object the symbols not be hashed to eliminate
    duplicates.  */
 #define BFD_TRADITIONAL_FORMAT 0x400
+
+/* This flag indicates that the BFD contents are actually cached in
+   memory.  If this is set, iostream points to a bfd_in_memory struct.  */
+#define BFD_IN_MEMORY 0x800
 \f
 /* symbols and relocation */
 
@@ -319,10 +336,15 @@ typedef struct _symbol_info
   symvalue value;
   char type;
   CONST char *name;            /* Symbol name.  */
-  char stab_other;             /* Unused. */
-  short stab_desc;             /* Info for N_TYPE.  */
-  CONST char *stab_name;
+  unsigned char stab_type;     /* Stab type.  */
+  char stab_other;             /* Stab other. */
+  short stab_desc;             /* Stab desc.  */
+  CONST char *stab_name;       /* String for stab type.  */
 } symbol_info;
+
+/* Get the name of a stabs type code.  */
+
+extern const char *bfd_get_stab_name PARAMS ((int));
 \f
 /* Hash table routines.  There is no way to free up a hash table.  */
 
@@ -459,6 +481,12 @@ extern int bfd_stat PARAMS ((bfd *abfd, struct stat *));
 #define bfd_get_format(abfd) ((abfd)->format)
 #define bfd_get_target(abfd) ((abfd)->xvec->name)
 #define bfd_get_flavour(abfd) ((abfd)->xvec->flavour)
+#define bfd_big_endian(abfd) ((abfd)->xvec->byteorder == BFD_ENDIAN_BIG)
+#define bfd_little_endian(abfd) ((abfd)->xvec->byteorder == BFD_ENDIAN_LITTLE)
+#define bfd_header_big_endian(abfd) \
+  ((abfd)->xvec->header_byteorder == BFD_ENDIAN_BIG)
+#define bfd_header_little_endian(abfd) \
+  ((abfd)->xvec->header_byteorder == BFD_ENDIAN_LITTLE)
 #define bfd_get_file_flags(abfd) ((abfd)->flags)
 #define bfd_applicable_file_flags(abfd) ((abfd)->xvec->object_flags)
 #define bfd_applicable_section_flags(abfd) ((abfd)->xvec->section_flags)
@@ -477,6 +505,10 @@ extern int bfd_stat PARAMS ((bfd *abfd, struct stat *));
 
 #define bfd_set_cacheable(abfd,bool) (((abfd)->cacheable = (boolean)(bool)), true)
 
+extern boolean bfd_record_phdr
+  PARAMS ((bfd *, unsigned long, boolean, flagword, boolean, bfd_vma,
+          boolean, boolean, unsigned int, struct sec **));
+
 /* Byte swapping routines.  */
 
 bfd_vma                bfd_getb64         PARAMS ((const unsigned char *));
@@ -506,6 +538,7 @@ struct ecoff_debug_swap;
 struct ecoff_extr;
 struct symbol_cache_entry;
 struct bfd_link_info;
+struct bfd_link_hash_entry;
 #endif
 extern bfd_vma bfd_ecoff_get_gp_value PARAMS ((bfd * abfd));
 extern boolean bfd_ecoff_set_gp_value PARAMS ((bfd *abfd, bfd_vma gp_value));
@@ -558,17 +591,18 @@ extern boolean bfd_mips_ecoff_create_embedded_relocs
 
 /* Externally visible ELF routines.  */
 
-extern boolean bfd_elf32_record_link_assignment
-  PARAMS ((bfd *, struct bfd_link_info *, const char *, boolean));
-extern boolean bfd_elf64_record_link_assignment
-  PARAMS ((bfd *, struct bfd_link_info *, const char *, boolean));
-struct bfd_elf_link_needed_list
+struct bfd_link_needed_list
 {
-  struct bfd_elf_link_needed_list *next;
+  struct bfd_link_needed_list *next;
   bfd *by;
   const char *name;
 };
-extern struct bfd_elf_link_needed_list *bfd_elf_get_needed_list
+
+extern boolean bfd_elf32_record_link_assignment
+  PARAMS ((bfd *, struct bfd_link_info *, const char *, boolean));
+extern boolean bfd_elf64_record_link_assignment
+  PARAMS ((bfd *, struct bfd_link_info *, const char *, boolean));
+extern struct bfd_link_needed_list *bfd_elf_get_needed_list
   PARAMS ((bfd *, struct bfd_link_info *));
 extern boolean bfd_elf32_size_dynamic_sections
   PARAMS ((bfd *, const char *, const char *, boolean,
@@ -577,9 +611,12 @@ extern boolean bfd_elf64_size_dynamic_sections
   PARAMS ((bfd *, const char *, const char *, boolean,
           struct bfd_link_info *, struct sec **));
 extern void bfd_elf_set_dt_needed_name PARAMS ((bfd *, const char *));
+extern const char *bfd_elf_get_dt_soname PARAMS ((bfd *));
 
 /* SunOS shared library support routines for the linker.  */
 
+extern struct bfd_link_needed_list *bfd_sunos_get_needed_list
+  PARAMS ((bfd *, struct bfd_link_info *));
 extern boolean bfd_sunos_record_link_assignment
   PARAMS ((bfd *, struct bfd_link_info *, const char *));
 extern boolean bfd_sunos_size_dynamic_sections
@@ -588,9 +625,66 @@ extern boolean bfd_sunos_size_dynamic_sections
 
 /* Linux shared library support routines for the linker.  */
 
-extern boolean bfd_linux_size_dynamic_sections
+extern boolean bfd_i386linux_size_dynamic_sections
+  PARAMS ((bfd *, struct bfd_link_info *));
+extern boolean bfd_m68klinux_size_dynamic_sections
   PARAMS ((bfd *, struct bfd_link_info *));
 
+/* mmap hacks */
+
+struct _bfd_window_internal;
+typedef struct _bfd_window_internal bfd_window_internal;
+
+typedef struct _bfd_window {
+  /* What the user asked for.  */
+  PTR data;
+  bfd_size_type size;
+  /* The actual window used by BFD.  Small user-requested read-only
+     regions sharing a page may share a single window into the object
+     file.  Read-write versions shouldn't until I've fixed things to
+     keep track of which portions have been claimed by the
+     application; don't want to give the same region back when the
+     application wants two writable copies!  */
+  struct _bfd_window_internal *i;
+} bfd_window;
+
+extern void bfd_init_window PARAMS ((bfd_window *));
+extern void bfd_free_window PARAMS ((bfd_window *));
+extern boolean bfd_get_file_window
+  PARAMS ((bfd *, file_ptr, bfd_size_type, bfd_window *, boolean));
+
+/* XCOFF support routines for the linker.  */
+
+extern boolean bfd_xcoff_link_record_set
+  PARAMS ((bfd *, struct bfd_link_info *, struct bfd_link_hash_entry *,
+          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 *));
+extern boolean bfd_xcoff_export_symbol
+  PARAMS ((bfd *, struct bfd_link_info *, struct bfd_link_hash_entry *,
+          boolean));
+extern boolean bfd_xcoff_link_count_reloc
+  PARAMS ((bfd *, struct bfd_link_info *, const char *));
+extern boolean bfd_xcoff_record_link_assignment
+  PARAMS ((bfd *, struct bfd_link_info *, const char *));
+extern boolean bfd_xcoff_size_dynamic_sections
+  PARAMS ((bfd *, struct bfd_link_info *, const char *, const char *,
+          unsigned long, unsigned long, unsigned long, boolean,
+          int, boolean, boolean, struct sec **));
+
+/* Externally visible COFF routines.  */
+
+#if defined(__STDC__) || defined(ALMOST_STDC)
+struct internal_syment;
+union internal_auxent;
+#endif
+
+extern boolean bfd_coff_get_syment
+  PARAMS ((bfd *, struct symbol_cache_entry *, struct internal_syment *));
+extern boolean bfd_coff_get_auxent
+  PARAMS ((bfd *, struct symbol_cache_entry *, int, union internal_auxent *));
+
 /* And more from the source.  */
 void 
 bfd_init PARAMS ((void));
@@ -788,7 +882,7 @@ typedef struct sec
            sections. */
 #define SEC_COFF_SHARED_LIBRARY 0x800
 
-         /* The section is a common section (symbols may be defined
+         /* 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
            used).  Most targets have exactly one of these (which we
@@ -807,8 +901,59 @@ typedef struct sec
            memory if appropriate.  */
 #define SEC_IN_MEMORY 0x20000
 
+         /* The contents of this section are to be excluded by the
+           linker for executable and shared objects unless those
+           objects are to be further relocated.  */
+#define SEC_EXCLUDE 0x40000
+
+        /* The contents of this section are to be sorted by the
+          based on the address specified in the associated symbol
+          table.  */
+#define SEC_SORT_ENTRIES 0x80000
+
+        /* When linking, duplicate sections of the same name should be
+          discarded, rather than being combined into a single section as
+          is usually done.  This is similar to how common symbols are
+          handled.  See SEC_LINK_DUPLICATES below.  */
+#define SEC_LINK_ONCE 0x100000
+
+        /* If SEC_LINK_ONCE is set, this bitfield describes how the linker
+          should handle duplicate sections.  */
+#define SEC_LINK_DUPLICATES 0x600000
+
+        /* This value for SEC_LINK_DUPLICATES means that duplicate
+          sections with the same name should simply be discarded. */
+#define SEC_LINK_DUPLICATES_DISCARD 0x0
+
+        /* This value for SEC_LINK_DUPLICATES means that the linker
+          should warn if there are any duplicate sections, although
+          it should still only link one copy.  */
+#define SEC_LINK_DUPLICATES_ONE_ONLY 0x200000
+
+        /* This value for SEC_LINK_DUPLICATES means that the linker
+          should warn if any duplicate sections are a different size.  */
+#define SEC_LINK_DUPLICATES_SAME_SIZE 0x400000
+
+        /* This value for SEC_LINK_DUPLICATES means that the linker
+          should warn if any duplicate sections contain different
+          contents.  */
+#define SEC_LINK_DUPLICATES_SAME_CONTENTS 0x600000
+
         /*  End of section flags.  */
 
+        /* Some internal packed boolean fields.  */
+
+        /* See the vma field.  */
+       unsigned int user_set_vma : 1;
+
+        /* Whether relocations have been processed.  */
+       unsigned int reloc_done : 1;
+
+        /* A mark flag used by some of the linker backends.  */
+       unsigned int linker_mark : 1;
+
+        /* End of internal packed boolean fields.  */
+
         /*  The virtual memory address of the section - where it will be
            at run time.  The symbols are relocated against this.  The
            user_set_vma flag is maintained by bfd; if it's not set, the
@@ -817,7 +962,6 @@ typedef struct sec
            target and various flags).  */
 
    bfd_vma vma;
-   boolean user_set_vma;
 
         /*  The load address of the section - where it would be in a
            rom image; really only used for writing section header
@@ -918,7 +1062,6 @@ typedef struct sec
 
    bfd *owner;
 
-   boolean reloc_done;
          /* A symbol which points at this section only */
    struct symbol_cache_entry *symbol;
    struct symbol_cache_entry **symbol_ptr_ptr;
@@ -1003,7 +1146,7 @@ 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 (ibfd, _bfd_copy_private_section_data, \
+     BFD_SEND (obfd, _bfd_copy_private_section_data, \
                (ibfd, isection, obfd, osection))
 enum bfd_architecture 
 {
@@ -1026,16 +1169,26 @@ enum bfd_architecture
 #define bfd_mach_i960_mc        4
 #define bfd_mach_i960_xa        5
 #define bfd_mach_i960_ca        6
-  /* start-sanitize-i960xl */
-#define bfd_mach_i960_xl        7
-  /* end-sanitize-i960xl */
+#define bfd_mach_i960_jx        7
+#define bfd_mach_i960_hx        8
 
   bfd_arch_a29k,       /* AMD 29000 */
   bfd_arch_sparc,      /* SPARC */
-#define bfd_mach_sparc         1
-#define bfd_mach_sparc64       2
+#define bfd_mach_sparc                 1
+ /* The difference between v8plus and v9 is that v9 is a true 64 bit env.  */
+#define bfd_mach_sparc_sparclet        2
+#define bfd_mach_sparc_sparclite       3
+#define bfd_mach_sparc_v8plus          4
+#define bfd_mach_sparc_v8plusa         5  /* with ultrasparc add'ns */
+#define bfd_mach_sparc_v9              6
+#define bfd_mach_sparc_v9a             7  /* with ultrasparc 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)
   bfd_arch_mips,       /* MIPS Rxxxx */
   bfd_arch_i386,       /* Intel 386 */
+#define bfd_mach_i386_i386 0
+#define bfd_mach_i386_i8086 1
   bfd_arch_we32k,      /* AT&T WE32xxx */
   bfd_arch_tahoe,      /* CCI/Harris Tahoe */
   bfd_arch_i860,       /* Intel 860 */
@@ -1047,21 +1200,28 @@ enum bfd_architecture
   bfd_arch_h8300,      /* Hitachi H8/300 */
 #define bfd_mach_h8300   1
 #define bfd_mach_h8300h  2
+#define bfd_mach_h8300s  3
   bfd_arch_powerpc,    /* PowerPC */
   bfd_arch_rs6000,     /* IBM RS/6000 */
   bfd_arch_hppa,       /* HP PA RISC */
+  /* start-sanitize-d10v */
+  bfd_arch_d10v,       /* Mitsubishi D10V */
+  /* end-sanitize-d10v */
   bfd_arch_z8k,        /* Zilog Z8000 */
 #define bfd_mach_z8001         1
 #define bfd_mach_z8002         2
   bfd_arch_h8500,      /* Hitachi H8/500 */
   bfd_arch_sh,         /* Hitachi SH */
+  /* start-sanitize-tic80 */
+  bfd_arch_tic80,      /* TI TMS320C80 (MVP) */
+  /* end-sanitize-tic80 */
   bfd_arch_alpha,      /* Dec Alpha */
   bfd_arch_arm,        /* Advanced Risc Machines ARM */
   bfd_arch_ns32k,      /* National Semiconductors ns32000 */
   bfd_arch_w65,        /* WDC 65816 */
-  /* start-sanitize-rce */
-  bfd_arch_rce,        /* Motorola RCE */
-  /* end-sanitize-rce */
+  /* start-sanitize-v850 */
+  bfd_arch_v850,       /* NEC V850 */
+  /* end-sanitize-v850 */
   /* start-sanitize-arc */
   bfd_arch_arc,        /* Argonaut RISC Core */
 #define bfd_mach_arc_base 0
@@ -1069,6 +1229,11 @@ enum bfd_architecture
 #define bfd_mach_arc_graphics 2
 #define bfd_mach_arc_audio 3
   /* end-sanitize-arc */
+  /* start-sanitize-m32r */
+  bfd_arch_m32r,       /* Mitsubishi M32R */
+  /* end-sanitize-m32r */
+  bfd_arch_mn10200,    /* Matsushita MN10200 */
+  bfd_arch_mn10300,    /* Matsushita MN10300 */
   bfd_arch_last
   };
 
@@ -1079,39 +1244,32 @@ typedef struct bfd_arch_info
   int bits_per_byte;
   enum bfd_architecture arch;
   unsigned long mach;
-  char *arch_name;
-  CONST  char *printable_name;
+  const char *arch_name;
+  const char *printable_name;
   unsigned int section_align_power;
   /* true if this is the default machine for the architecture */
   boolean the_default; 
-  CONST struct bfd_arch_info * (*compatible)
-       PARAMS ((CONST struct bfd_arch_info *a,
-                CONST struct bfd_arch_info *b));
-
-  boolean (*scan) PARAMS ((CONST struct bfd_arch_info *, CONST char *));
-   /* How to disassemble an instruction, producing a printable
-     representation on a specified stdio stream.  This isn't
-     defined for most processors at present, because of the size
-     of the additional tables it would drag in, and because gdb
-     wants to use a different interface.  */
-  unsigned int (*disassemble) PARAMS ((bfd_vma addr, CONST char *data,
-                                       PTR stream));
-
-  struct bfd_arch_info *next;
+  const struct bfd_arch_info * (*compatible)
+       PARAMS ((const struct bfd_arch_info *a,
+                const struct bfd_arch_info *b));
+
+  boolean (*scan) PARAMS ((const struct bfd_arch_info *, const char *));
+
+  const struct bfd_arch_info *next;
 } bfd_arch_info_type;
-CONST char *
+const char *
 bfd_printable_name PARAMS ((bfd *abfd));
 
-bfd_arch_info_type *
-bfd_scan_arch PARAMS ((CONST char *string));
+const bfd_arch_info_type *
+bfd_scan_arch PARAMS ((const char *string));
 
-CONST bfd_arch_info_type *
+const bfd_arch_info_type *
 bfd_arch_get_compatible PARAMS ((
-    CONST bfd *abfd,
-    CONST bfd *bbfd));
+    const bfd *abfd,
+    const bfd *bbfd));
 
 void 
-bfd_set_arch_info PARAMS ((bfd *abfd, bfd_arch_info_type *arg));
+bfd_set_arch_info PARAMS ((bfd *abfd, const bfd_arch_info_type *arg));
 
 enum bfd_architecture 
 bfd_get_arch PARAMS ((bfd *abfd));
@@ -1125,16 +1283,16 @@ bfd_arch_bits_per_byte PARAMS ((bfd *abfd));
 unsigned int 
 bfd_arch_bits_per_address PARAMS ((bfd *abfd));
 
-bfd_arch_info_type * 
+const bfd_arch_info_type * 
 bfd_get_arch_info PARAMS ((bfd *abfd));
 
-bfd_arch_info_type *
+const bfd_arch_info_type *
 bfd_lookup_arch
  PARAMS ((enum bfd_architecture
     arch,
     unsigned long machine));
 
-CONST char *
+const char *
 bfd_printable_arch_mach
  PARAMS ((enum bfd_architecture arch, unsigned long machine));
 
@@ -1355,12 +1513,19 @@ The 24-bit relocation is used in some Intel 960 configurations. */
   BFD_RELOC_8_GOT_PCREL,
   BFD_RELOC_32_GOTOFF,
   BFD_RELOC_16_GOTOFF,
+  BFD_RELOC_LO16_GOTOFF,
+  BFD_RELOC_HI16_GOTOFF,
+  BFD_RELOC_HI16_S_GOTOFF,
   BFD_RELOC_8_GOTOFF,
   BFD_RELOC_32_PLT_PCREL,
+  BFD_RELOC_24_PLT_PCREL,
   BFD_RELOC_16_PLT_PCREL,
   BFD_RELOC_8_PLT_PCREL,
   BFD_RELOC_32_PLTOFF,
   BFD_RELOC_16_PLTOFF,
+  BFD_RELOC_LO16_PLTOFF,
+  BFD_RELOC_HI16_PLTOFF,
+  BFD_RELOC_HI16_S_PLTOFF,
   BFD_RELOC_8_PLTOFF,
 
 /* Relocations used by 68K ELF. */
@@ -1371,6 +1536,9 @@ The 24-bit relocation is used in some Intel 960 configurations. */
 /* Linkage-table relative. */
   BFD_RELOC_32_BASEREL,
   BFD_RELOC_16_BASEREL,
+  BFD_RELOC_LO16_BASEREL,
+  BFD_RELOC_HI16_BASEREL,
+  BFD_RELOC_HI16_S_BASEREL,
   BFD_RELOC_8_BASEREL,
   BFD_RELOC_RVA,
 
@@ -1438,10 +1606,12 @@ relocation types already defined. */
   BFD_RELOC_SPARC_WDISP16,
   BFD_RELOC_SPARC_WDISP19,
   BFD_RELOC_SPARC_GLOB_JMP,
-  BFD_RELOC_SPARC_LO7,
+  BFD_RELOC_SPARC_7,
+  BFD_RELOC_SPARC_6,
+  BFD_RELOC_SPARC_5,
 
-/* Alpha ECOFF relocations.  Some of these treat the symbol or "addend"
-in some special way.
+/* Alpha ECOFF and ELF relocations.  Some of these treat the symbol or
+"addend" in some special way.
 For GPDISP_HI16 ("gpdisp") relocations, the symbol is ignored when
 writing; when reading, it will be the absolute section symbol.  The
 addend is the displacement in bytes of the "lda" instruction from
@@ -1454,6 +1624,11 @@ relocations out, and is filled in with the file's GP value on
 reading, for convenience. */
   BFD_RELOC_ALPHA_GPDISP_LO16,
 
+/* The ELF GPDISP relocation is exactly the same as the GPDISP_HI16
+relocation except that there is no accompanying GPDISP_LO16
+relocation. */
+  BFD_RELOC_ALPHA_GPDISP,
+
 /* The Alpha LITERAL/LITUSE relocs are produced by a symbol reference;
 the assembler turns it into a LDQ instruction to load the address of
 the symbol, and then fills in a register in the real instruction.
@@ -1463,6 +1638,12 @@ section symbol.  The addend is ignored when writing, but is filled
 in with the file's GP value on reading, for convenience, as with the
 GPDISP_LO16 reloc.
 
+The ELF_LITERAL reloc is somewhere between 16_GOTOFF and GPDISP_LO16.
+It should refer to the symbol to be referenced, as with 16_GOTOFF,
+but it generates output not based on the position within the .got
+section, but relative to the GP value chosen for the file during the
+final link stage.
+
 The LITUSE reloc, on the instruction using the loaded address, gives
 information to the linker that it might be able to use to optimize
 away some literal section references.  The symbol is ignored (read
@@ -1474,6 +1655,7 @@ of instruction using the register:
 
 The GNU linker currently doesn't do any of this optimizing. */
   BFD_RELOC_ALPHA_LITERAL,
+  BFD_RELOC_ALPHA_ELF_LITERAL,
   BFD_RELOC_ALPHA_LITUSE,
 
 /* The HINT relocation indicates a value that should be filled into the
@@ -1481,10 +1663,17 @@ The GNU linker currently doesn't do any of this optimizing. */
 prediction logic which may be provided on some processors. */
   BFD_RELOC_ALPHA_HINT,
 
+/* The LINKAGE relocation outputs a linkage pair in the object file,
+which is filled by the linker. */
+  BFD_RELOC_ALPHA_LINKAGE,
+
 /* Bits 27..2 of the relocation address shifted right 2 bits;
 simple reloc otherwise. */
   BFD_RELOC_MIPS_JMP,
 
+/* The MIPS16 jump instruction. */
+  BFD_RELOC_MIPS16_JMP,
+
 /* High 16 bits of 32-bit value; simple reloc. */
   BFD_RELOC_HI16,
 
@@ -1513,6 +1702,10 @@ to compensate for the borrow when the low bits are added. */
   BFD_RELOC_MIPS_GOT16,
   BFD_RELOC_MIPS_CALL16,
 #define BFD_RELOC_MIPS_GPREL32 BFD_RELOC_GPREL32
+  BFD_RELOC_MIPS_GOT_HI16,
+  BFD_RELOC_MIPS_GOT_LO16,
+  BFD_RELOC_MIPS_CALL_HI16,
+  BFD_RELOC_MIPS_CALL_LO16,
 
 /* i386/elf relocations */
   BFD_RELOC_386_GOT32,
@@ -1538,16 +1731,37 @@ to compensate for the borrow when the low bits are added. */
   BFD_RELOC_NS32K_DISP_16_PCREL,
   BFD_RELOC_NS32K_DISP_32_PCREL,
 
-/* PowerPC/POWER (RS/6000) relocs.
-26 bit relative branch.  Low two bits must be zero.  High 24
-bits installed in bits 6 through 29 of instruction. */
+/* Power(rs6000) and PowerPC relocations. */
   BFD_RELOC_PPC_B26,
-
-/* 26 bit absolute branch, like BFD_RELOC_PPC_B26 but absolute. */
   BFD_RELOC_PPC_BA26,
-
-/* 16 bit TOC relative reference. */
   BFD_RELOC_PPC_TOC16,
+  BFD_RELOC_PPC_B16,
+  BFD_RELOC_PPC_B16_BRTAKEN,
+  BFD_RELOC_PPC_B16_BRNTAKEN,
+  BFD_RELOC_PPC_BA16,
+  BFD_RELOC_PPC_BA16_BRTAKEN,
+  BFD_RELOC_PPC_BA16_BRNTAKEN,
+  BFD_RELOC_PPC_COPY,
+  BFD_RELOC_PPC_GLOB_DAT,
+  BFD_RELOC_PPC_JMP_SLOT,
+  BFD_RELOC_PPC_RELATIVE,
+  BFD_RELOC_PPC_LOCAL24PC,
+  BFD_RELOC_PPC_EMB_NADDR32,
+  BFD_RELOC_PPC_EMB_NADDR16,
+  BFD_RELOC_PPC_EMB_NADDR16_LO,
+  BFD_RELOC_PPC_EMB_NADDR16_HI,
+  BFD_RELOC_PPC_EMB_NADDR16_HA,
+  BFD_RELOC_PPC_EMB_SDAI16,
+  BFD_RELOC_PPC_EMB_SDA2I16,
+  BFD_RELOC_PPC_EMB_SDA2REL,
+  BFD_RELOC_PPC_EMB_SDA21,
+  BFD_RELOC_PPC_EMB_MRKREF,
+  BFD_RELOC_PPC_EMB_RELSEC16,
+  BFD_RELOC_PPC_EMB_RELST_LO,
+  BFD_RELOC_PPC_EMB_RELST_HI,
+  BFD_RELOC_PPC_EMB_RELST_HA,
+  BFD_RELOC_PPC_EMB_BIT_FLD,
+  BFD_RELOC_PPC_EMB_RELSDA,
 
 /* The type of reloc used to build a contructor table - at the moment
 probably a 32 bit wide absolute relocation, but the target can choose.
@@ -1570,6 +1784,32 @@ not stored in the instruction. */
   BFD_RELOC_ARM_LDR_IMM,
   BFD_RELOC_ARM_LITERAL,
   BFD_RELOC_ARM_IN_POOL,
+  BFD_RELOC_ARM_OFFSET_IMM8,
+  BFD_RELOC_ARM_HWLITERAL,
+  BFD_RELOC_ARM_THUMB_ADD,
+  BFD_RELOC_ARM_THUMB_IMM,
+  BFD_RELOC_ARM_THUMB_SHIFT,
+  BFD_RELOC_ARM_THUMB_OFFSET,
+
+/* Hitachi SH relocs.  Not all of these appear in object files. */
+  BFD_RELOC_SH_PCDISP8BY2,
+  BFD_RELOC_SH_PCDISP12BY2,
+  BFD_RELOC_SH_IMM4,
+  BFD_RELOC_SH_IMM4BY2,
+  BFD_RELOC_SH_IMM4BY4,
+  BFD_RELOC_SH_IMM8,
+  BFD_RELOC_SH_IMM8BY2,
+  BFD_RELOC_SH_IMM8BY4,
+  BFD_RELOC_SH_PCRELIMM8BY2,
+  BFD_RELOC_SH_PCRELIMM8BY4,
+  BFD_RELOC_SH_SWITCH16,
+  BFD_RELOC_SH_SWITCH32,
+  BFD_RELOC_SH_USES,
+  BFD_RELOC_SH_COUNT,
+  BFD_RELOC_SH_ALIGN,
+  BFD_RELOC_SH_CODE,
+  BFD_RELOC_SH_DATA,
+  BFD_RELOC_SH_LABEL,
 /* start-sanitize-arc */
 
 /* Argonaut RISC Core (ARC) relocs.
@@ -1583,6 +1823,72 @@ stored in the instruction.  The high 24 bits are installed in bits 23
 through 0. */
   BFD_RELOC_ARC_B26,
 /* end-sanitize-arc */
+
+/* start-sanitize-d10v */
+
+/* Mitsubishi D10V relocs.
+This is a 10-bit reloc with the right 2 bits
+assumed to be 0. */
+  BFD_RELOC_D10V_10_PCREL_R,
+
+/* Mitsubishi D10V relocs.
+This is a 10-bit reloc with the right 2 bits
+assumed to be 0.  This is the same as the previous reloc
+except it is in the left container, i.e.,
+shifted left 15 bits. */
+  BFD_RELOC_D10V_10_PCREL_L,
+
+/* This is an 18-bit reloc with the right 2 bits
+assumed to be 0. */
+  BFD_RELOC_D10V_18,
+
+/* This is an 18-bit reloc with the right 2 bits
+assumed to be 0. */
+  BFD_RELOC_D10V_18_PCREL,
+/* end-sanitize-d10v */
+
+/* start-sanitize-m32r */
+
+/* Mitsubishi M32R relocs.
+This is a 24 bit absolute address. */
+  BFD_RELOC_M32R_24,
+
+/* This is a 10-bit pc-relative reloc with the right 2 bits assumed to be 0. */
+  BFD_RELOC_M32R_10_PCREL,
+
+/* This is an 18-bit reloc with the right 2 bits assumed to be 0. */
+  BFD_RELOC_M32R_18_PCREL,
+
+/* This is an 26-bit reloc with the right 2 bits assumed to be 0. */
+  BFD_RELOC_M32R_26_PCREL,
+/* end-sanitize-m32r */
+
+/* start-sanitize-v850 */
+
+/* This is a 9-bit reloc */
+  BFD_RELOC_V850_9_PCREL,
+
+/* This is a 22-bit reloc */
+  BFD_RELOC_V850_22_PCREL,
+
+/* This is an offset from the short data area pointer.. */
+  BFD_RELOC_V850_SDA_OFFSET,
+
+/* This is an offset from the zero data area pointer.. */
+  BFD_RELOC_V850_ZDA_OFFSET,
+
+/* This is an offset from the tiny data area pointer.. */
+  BFD_RELOC_V850_TDA_OFFSET,
+/* end-sanitize-v850 */
+
+
+/* This is a 32bit pcrel reloc for the mn10300, offset by two bytes in the
+instruction. */
+  BFD_RELOC_MN10300_32_PCREL,
+
+/* This is a 16bit pcrel reloc for the mn10300, offset by two bytes in the
+instruction. */
+  BFD_RELOC_MN10300_16_PCREL,
   BFD_RELOC_UNUSED };
 typedef enum bfd_reloc_code_real bfd_reloc_code_real_type;
 reloc_howto_type *
@@ -1674,15 +1980,14 @@ typedef struct symbol_cache_entry
         /* Signal that the symbol is the label of constructor section. */
 #define BSF_CONSTRUCTOR   0x800
 
-        /* Signal that the symbol is a warning symbol. If the symbol
-          is a warning symbol, then the value field (I know this is
-          tacky) will point to the asymbol which when referenced will
-          cause the warning. */
+        /* Signal that the symbol is a warning symbol.  The name is a
+          warning.  The name of the next symbol is the one to warn about;
+          if a reference is made to a symbol with the same name as the next
+          symbol, a warning is issued by the linker. */
 #define BSF_WARNING       0x1000
 
-        /* Signal that the symbol is indirect. The value of the symbol
-          is a pointer to an undefined asymbol which contains the
-          name to use instead. */
+        /* Signal that the symbol is indirect.  This symbol is an indirect
+          pointer to the symbol with the same name as the next symbol. */
 #define BSF_INDIRECT      0x2000
 
         /* BSF_FILE marks symbols that contain a file name.  This is used
@@ -1692,6 +1997,10 @@ typedef struct symbol_cache_entry
         /* Symbol is from dynamic linking information.  */
 #define BSF_DYNAMIC       0x8000
 
+        /* The symbol denotes a data object.  Used in ELF, and perhaps
+          others someday.  */
+#define BSF_OBJECT        0x10000
+
   flagword flags;
 
         /* A pointer to the section to which this symbol is
@@ -1737,7 +2046,7 @@ 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 (ibfd, _bfd_copy_private_symbol_data, \
+     BFD_SEND (obfd, _bfd_copy_private_symbol_data, \
                (ibfd, isymbol, obfd, osymbol))
 struct _bfd 
 {
@@ -1751,8 +2060,10 @@ struct _bfd
        includes `<<bfd.h>>', IOSTREAM has been declared as a "char
        *", and MTIME as a "long".  Their correct types, to which they
        are cast when used, are "FILE *" and "time_t".    The iostream
-       is the result of an fopen on the filename. */
-    char *iostream;
+       is the result of an fopen on the filename.  However, if the
+       BFD_IN_MEMORY flag is set, then iostream is actually a pointer
+       to a bfd_in_memory struct.  */
+    PTR iostream;
 
      /* Is the file descriptor being cached?  That is, can it be closed as
        needed, and re-opened when accessed later?  */
@@ -1834,7 +2145,7 @@ struct _bfd
     struct symbol_cache_entry  **outsymbols;             
 
      /* Pointer to structure which contains architecture information*/
-    struct bfd_arch_info *arch_info;
+    const struct bfd_arch_info *arch_info;
 
      /* Stuff only useful for archives:*/
     PTR arelt_data;              
@@ -1860,10 +2171,12 @@ struct _bfd
       struct _oasys_ar_data *oasys_ar_data;
       struct coff_tdata *coff_obj_data;
       struct pe_tdata *pe_obj_data;
+      struct xcoff_tdata *xcoff_obj_data;
       struct ecoff_tdata *ecoff_obj_data;
       struct ieee_data_struct *ieee_data;
       struct ieee_ar_data_struct *ieee_ar_data;
       struct srec_data_struct *srec_data;
+      struct ihex_data_struct *ihex_data;
       struct tekhex_data_struct *tekhex_data;
       struct elf_obj_tdata *elf_obj_data;
       struct nlm_obj_tdata *nlm_obj_data;
@@ -1878,6 +2191,7 @@ struct _bfd
       struct osf_core_struct *osf_core_data;
       struct cisco_core_struct *cisco_core_data;
       struct versados_data_struct *versados_data;
+      struct netbsd_core_struct *netbsd_core_data;
       PTR any;
       } tdata;
   
@@ -1972,13 +2286,13 @@ boolean
 bfd_copy_private_bfd_data PARAMS ((bfd *ibfd, bfd *obfd));
 
 #define bfd_copy_private_bfd_data(ibfd, obfd) \
-     BFD_SEND (ibfd, _bfd_copy_private_bfd_data, \
+     BFD_SEND (obfd, _bfd_copy_private_bfd_data, \
                (ibfd, obfd))
 boolean 
 bfd_merge_private_bfd_data PARAMS ((bfd *ibfd, bfd *obfd));
 
 #define bfd_merge_private_bfd_data(ibfd, obfd) \
-     BFD_SEND (ibfd, _bfd_merge_private_bfd_data, \
+     BFD_SEND (obfd, _bfd_merge_private_bfd_data, \
                (ibfd, obfd))
 boolean 
 bfd_set_private_flags PARAMS ((bfd *abfd, flagword flags));
@@ -2053,9 +2367,6 @@ bfd_get_next_mapent PARAMS ((bfd *abfd, symindex previous, carsym **sym));
 boolean 
 bfd_set_archive_head PARAMS ((bfd *output, bfd *new_head));
 
-bfd *
-bfd_get_elt_at_index PARAMS ((bfd *archive, int index));
-
 bfd *
 bfd_openr_next_archived_file PARAMS ((bfd *archive, bfd *previous));
 
@@ -2100,12 +2411,16 @@ enum bfd_flavour {
   bfd_target_oasys_flavour,
   bfd_target_tekhex_flavour,
   bfd_target_srec_flavour,
+  bfd_target_ihex_flavour,
   bfd_target_som_flavour,
   bfd_target_os9k_flavour,
   bfd_target_versados_flavour,
-  bfd_target_msdos_flavour
+  bfd_target_msdos_flavour,
+  bfd_target_evax_flavour
 };
 
+enum bfd_endian { BFD_ENDIAN_BIG, BFD_ENDIAN_LITTLE, BFD_ENDIAN_UNKNOWN };
+
  /* Forward declaration.  */
 typedef struct bfd_link_info _bfd_link_info;
 
@@ -2113,8 +2428,8 @@ typedef struct bfd_target
 {
   char *name;
   enum bfd_flavour flavour;
-  boolean byteorder_big_p;
-  boolean header_byteorder_big_p;
+  enum bfd_endian byteorder;
+  enum bfd_endian header_byteorder;
   flagword object_flags;       
   flagword section_flags;
   char symbol_leading_char;
@@ -2147,7 +2462,9 @@ typedef struct bfd_target
 CAT(NAME,_close_and_cleanup),\
 CAT(NAME,_bfd_free_cached_info),\
 CAT(NAME,_new_section_hook),\
-CAT(NAME,_get_section_contents)
+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 *));
    /* Ask the BFD to free all cached information.  */
@@ -2157,6 +2474,9 @@ CAT(NAME,_get_section_contents)
    /* 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));
 
    /* Entry points to copy private data.  */
 #define BFD_JUMP_TABLE_COPY(NAME)\
@@ -2184,7 +2504,7 @@ CAT(NAME,_bfd_print_private_bfd_data)\
   boolean       (*_bfd_set_private_flags) PARAMS ((bfd *, flagword));
 
    /* Called to print private BFD data */
-  boolean       (*_bfd_print_private_bfd_data) PARAMS ((bfd *, void  *));
+  boolean       (*_bfd_print_private_bfd_data) PARAMS ((bfd *, PTR));
 
    /* Core file entry points.  */
 #define BFD_JUMP_TABLE_CORE(NAME)\
@@ -2202,7 +2522,9 @@ CAT(NAME,_slurp_extended_name_table),\
 CAT(NAME,_construct_extended_name_table),\
 CAT(NAME,_truncate_arname),\
 CAT(NAME,_write_armap),\
+CAT(NAME,_read_ar_hdr),\
 CAT(NAME,_openr_next_archived_file),\
+CAT(NAME,_get_elt_at_index),\
 CAT(NAME,_generic_stat_arch_elt),\
 CAT(NAME,_update_armap_timestamp)
   boolean  (*_bfd_slurp_armap) PARAMS ((bfd *));
@@ -2215,7 +2537,10 @@ CAT(NAME,_update_armap_timestamp)
                               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));
+#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 *));
   boolean  (*_bfd_update_armap_timestamp) PARAMS ((bfd *));
 
This page took 0.035707 seconds and 4 git commands to generate.