Add initialiser for membership field
[deliverable/binutils-gdb.git] / bfd / bfd-in2.h
index c82df23e45b78d817b446fa9958b6ec468b69f4c..8120e24c4bbe5163f6225827f1af8dbd4c0b3815 100644 (file)
@@ -84,7 +84,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 +93,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 */
@@ -177,8 +177,8 @@ 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  */
 
@@ -284,7 +284,6 @@ 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 */
@@ -344,7 +343,7 @@ typedef struct _symbol_info
   char type;
   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.  */
 } symbol_info;
@@ -481,7 +480,6 @@ extern long bfd_tell PARAMS ((bfd *abfd));
 extern int bfd_flush PARAMS ((bfd *abfd));
 extern int bfd_stat PARAMS ((bfd *abfd, struct stat *));
 
-
 /* Cast from const char * to char * so that caller can assign to
    a char * without a warning.  */
 #define bfd_get_filename(abfd) ((char *) (abfd)->filename)
@@ -514,7 +512,7 @@ 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_record_phdr
   PARAMS ((bfd *, unsigned long, boolean, flagword, boolean, bfd_vma,
@@ -629,6 +627,8 @@ extern boolean bfd_elf64_size_dynamic_sections
 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
@@ -647,9 +647,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
@@ -762,7 +766,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));
 
@@ -907,10 +911,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
@@ -1006,6 +1006,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
@@ -1205,6 +1213,10 @@ typedef struct sec
 
   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.  */
 
@@ -1272,6 +1284,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));
 
@@ -1317,7 +1334,7 @@ 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 */
@@ -1330,14 +1347,14 @@ enum bfd_architecture
 #define bfd_mach_m68040 6
 #define bfd_mach_m68060 7
 #define bfd_mach_cpu32  8
-  bfd_arch_vax,       /* DEC Vax */   
+  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
@@ -1360,9 +1377,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
@@ -1378,11 +1398,14 @@ enum bfd_architecture
 #define bfd_mach_mips6000              6000
 #define bfd_mach_mips8000              8000
 #define bfd_mach_mips10000             10000
+#define bfd_mach_mips4K                32
 #define bfd_mach_mips16                16
   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 */
@@ -1452,6 +1475,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 */
@@ -1474,6 +1499,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
@@ -1485,7 +1512,7 @@ enum bfd_architecture
   bfd_arch_last
   };
 
-typedef struct bfd_arch_info 
+typedef struct bfd_arch_info
 {
   int bits_per_word;
   int bits_per_address;
@@ -1496,7 +1523,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));
@@ -2034,6 +2061,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,
@@ -2160,6 +2197,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. */
@@ -2533,7 +2575,6 @@ this offset in the reloc's section offset. */
   BFD_RELOC_IA64_LTOFF_FPTR64I,
   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,
@@ -2552,8 +2593,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,
@@ -2581,6 +2620,40 @@ This is the 3 bits of a value. */
   BFD_RELOC_CRIS_SIGNED_6,
   BFD_RELOC_CRIS_UNSIGNED_6,
   BFD_RELOC_CRIS_UNSIGNED_4,
+
+/* 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,
   BFD_RELOC_UNUSED };
 typedef enum bfd_reloc_code_real bfd_reloc_code_real_type;
 reloc_howto_type *
@@ -2751,10 +2824,10 @@ bfd_copy_private_symbol_data PARAMS ((bfd *ibfd, asymbol *isym, bfd *obfd, asymb
 #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;
@@ -2787,7 +2860,7 @@ struct _bfd
     /* When a file is closed by the caching routines, BFD retains
        state information on the file here: */
 
-    file_ptr where;              
+    file_ptr where;
 
     /* and here: (``once'' means at least once) */
 
@@ -2800,7 +2873,7 @@ struct _bfd
 
     /* File modified time, if mtime_set is true: */
 
-    long mtime;          
+    long mtime;
 
     /* Reserved for an unimplemented file locking extension.*/
 
@@ -2819,13 +2892,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;             
+    file_ptr origin;
 
     /* Remember when output has begun, to stop strange things
        from happening. */
@@ -2837,7 +2910,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;
 
@@ -2845,17 +2918,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;
@@ -2866,7 +2939,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;
@@ -2898,7 +2971,7 @@ struct _bfd
       struct netbsd_core_struct *netbsd_core_data;
       PTR any;
       } tdata;
-  
+
     /* Used by the application to hold private data*/
     PTR usrdata;
 
This page took 0.030261 seconds and 4 git commands to generate.