Switched over to using new reloc types.
[deliverable/binutils-gdb.git] / bfd / bfd-in2.h
index d38f1de961ed767a1a576068fdc3d019d170f28d..aba89edc96df93c7767023ec04d4668610a9e486 100644 (file)
@@ -1,5 +1,5 @@
 /* Main header file for the bfd library -- portable access to object files.
-   Copyright 1990, 91, 92, 93, 94, 95, 1996 Free Software Foundation, Inc.
+   Copyright 1990, 91, 92, 93, 94, 95, 96, 1997 Free Software Foundation, Inc.
    Contributed by Cygnus Support.
 
 ** NOTE: bfd.h and bfd-in2.h are GENERATED files.  Don't change them;
@@ -49,7 +49,6 @@ extern "C" {
 #endif
 
 #include "ansidecl.h"
-#include "obstack.h"
 
 /* These two lines get substitutions done by commands in Makefile.in.  */
 #define BFD_VERSION  "@VERSION@"
@@ -310,6 +309,7 @@ typedef struct sec *sec_ptr;
 #define bfd_section_name(bfd, ptr) ((ptr)->name)
 #define bfd_section_size(bfd, ptr) (bfd_get_section_size_before_reloc(ptr))
 #define bfd_section_vma(bfd, ptr) ((ptr)->vma)
+#define bfd_section_lma(bfd, ptr) ((ptr)->lma)
 #define bfd_section_alignment(bfd, ptr) ((ptr)->alignment_power)
 #define bfd_get_section_flags(bfd, ptr) ((ptr)->flags + 0)
 #define bfd_get_section_userdata(bfd, ptr) ((ptr)->userdata)
@@ -380,8 +380,9 @@ struct bfd_hash_table
   struct bfd_hash_entry *(*newfunc) PARAMS ((struct bfd_hash_entry *,
                                             struct bfd_hash_table *,
                                             const char *));
-  /* An obstack for this hash table.  */
-  struct obstack memory;
+   /* An objalloc for this hash table.  This is a struct objalloc *,
+     but we use PTR to avoid requiring the inclusion of objalloc.h.  */
+  PTR memory;
 };
 
 /* Initialize a hash table.  */
@@ -539,6 +540,7 @@ struct ecoff_extr;
 struct symbol_cache_entry;
 struct bfd_link_info;
 struct bfd_link_hash_entry;
+struct bfd_elf_version_tree;
 #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));
@@ -605,11 +607,13 @@ extern boolean bfd_elf64_record_link_assignment
 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,
-          struct bfd_link_info *, struct sec **));
+  PARAMS ((bfd *, const char *, const char *, boolean, 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,
-          struct bfd_link_info *, struct sec **));
+  PARAMS ((bfd *, const char *, const char *, boolean, 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 const char *bfd_elf_get_dt_soname PARAMS ((bfd *));
 
@@ -629,6 +633,8 @@ 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 *));
+extern boolean bfd_sparclinux_size_dynamic_sections
+  PARAMS ((bfd *, struct bfd_link_info *));
 
 /* mmap hacks */
 
@@ -696,7 +702,7 @@ bfd *
 bfd_fdopenr PARAMS ((CONST char *filename, CONST char *target, int fd));
 
 bfd *
-bfd_openstreamr PARAMS (());
+bfd_openstreamr PARAMS ((const char *, const char *, PTR));
 
 bfd *
 bfd_openw PARAMS ((CONST char *filename, CONST char *target));
@@ -707,9 +713,6 @@ bfd_close PARAMS ((bfd *abfd));
 boolean 
 bfd_close_all_done PARAMS ((bfd *));
 
-bfd_size_type 
-bfd_alloc_size PARAMS ((bfd *abfd));
-
 bfd *
 bfd_create PARAMS ((CONST char *filename, bfd *templ));
 
@@ -939,6 +942,12 @@ typedef struct sec
           contents.  */
 #define SEC_LINK_DUPLICATES_SAME_CONTENTS 0x600000
 
+        /* This section was created by the linker as part of dynamic
+          relocation or other arcane processing.  It is skipped when
+          going through the first-pass output, trusting that someone
+          else up the line will take care of it later.  */
+#define SEC_LINKER_CREATED 0x800000
+
         /*  End of section flags.  */
 
         /* Some internal packed boolean fields.  */
@@ -1204,34 +1213,47 @@ enum bfd_architecture
   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 */
+  /* start-sanitize-d30v */
+  bfd_arch_d30v,       /* Mitsubishi D30V */
+  /* end-sanitize-d30v */
   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 */
+#define bfd_mach_sh            0
+#define bfd_mach_sh3        0x30
+#define bfd_mach_sh3e       0x3e
+   /* start-sanitize-sh4 */
+#define bfd_mach_sh4        0x40
+   /* end-sanitize-sh4 */
   bfd_arch_alpha,      /* Dec Alpha */
   bfd_arch_arm,        /* Advanced Risc Machines ARM */
+#define bfd_mach_arm_2         1
+#define bfd_mach_arm_2a                2
+#define bfd_mach_arm_3         3
+#define bfd_mach_arm_3M        4
+#define bfd_mach_arm_4                 5
+#define bfd_mach_arm_4T        6
   bfd_arch_ns32k,      /* National Semiconductors ns32000 */
   bfd_arch_w65,        /* WDC 65816 */
+  /* start-sanitize-tic80 */
+  bfd_arch_tic80,      /* TI TMS320c80 (MVP) */
+  /* end-sanitize-tic80 */
   /* start-sanitize-v850 */
   bfd_arch_v850,       /* NEC V850 */
+#define bfd_mach_v850          0
+  /* start-sanitize-v850e */
+#define bfd_mach_v850e         'E'
+  /* end-sanitize-v850e */
+  /* start-sanitize-v850eq */
+#define bfd_mach_v850eq        'Q'
+  /* end-sanitize-v850eq */
   /* end-sanitize-v850 */
-  /* start-sanitize-arc */
   bfd_arch_arc,        /* Argonaut RISC Core */
 #define bfd_mach_arc_base 0
-#define bfd_mach_arc_host 1
-#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_m32r,       /* Mitsubishi M32R/D */
   bfd_arch_mn10200,    /* Matsushita MN10200 */
   bfd_arch_mn10300,    /* Matsushita MN10300 */
   bfd_arch_last
@@ -1363,7 +1385,7 @@ enum complain_overflow
 
 struct reloc_howto_struct
 {
-        /*  The type field has mainly a documetary use - the back end can
+        /*  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
@@ -1491,6 +1513,7 @@ enum bfd_reloc_code_real {
   BFD_RELOC_64,
   BFD_RELOC_32,
   BFD_RELOC_26,
+  BFD_RELOC_24,
   BFD_RELOC_16,
   BFD_RELOC_14,
   BFD_RELOC_8,
@@ -1667,6 +1690,10 @@ prediction logic which may be provided on some processors. */
 which is filled by the linker. */
   BFD_RELOC_ALPHA_LINKAGE,
 
+/* The CODEADDR relocation outputs a STO_CA in the object file,
+which is filled by the linker. */
+  BFD_RELOC_ALPHA_CODEADDR,
+
 /* Bits 27..2 of the relocation address shifted right 2 bits;
 simple reloc otherwise. */
   BFD_RELOC_MIPS_JMP,
@@ -1674,6 +1701,9 @@ simple reloc otherwise. */
 /* The MIPS16 jump instruction. */
   BFD_RELOC_MIPS16_JMP,
 
+/* MIPS16 GP relative reloc. */
+  BFD_RELOC_MIPS16_GPREL,
+
 /* High 16 bits of 32-bit value; simple reloc. */
   BFD_RELOC_HI16,
 
@@ -1810,7 +1840,12 @@ not stored in the instruction. */
   BFD_RELOC_SH_CODE,
   BFD_RELOC_SH_DATA,
   BFD_RELOC_SH_LABEL,
-/* start-sanitize-arc */
+
+/* Thumb 23-, 12- and 9-bit pc-relative branches.  The lowest bit must
+be zero and is not stored in the instruction. */
+  BFD_RELOC_THUMB_PCREL_BRANCH9,
+  BFD_RELOC_THUMB_PCREL_BRANCH12,
+  BFD_RELOC_THUMB_PCREL_BRANCH23,
 
 /* Argonaut RISC Core (ARC) relocs.
 ARC 22 bit pc-relative branch.  The lowest two bits must be zero and are
@@ -1822,9 +1857,6 @@ through 7 of the instruction. */
 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
@@ -1845,9 +1877,38 @@ assumed to be 0. */
 /* 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 */
+/* start-sanitize-d30v */
+
+/* Mitsubishi D30V relocs.
+This is a 6-bit absolute reloc. */
+  BFD_RELOC_D30V_6,
+
+/* Mitsubishi D30V relocs.
+This is a 12-bit absolute reloc with the 
+right 3 bitsassumed to be 0. */
+  BFD_RELOC_D30V_15,
+
+/* Mitsubishi D30V relocs.
+This is a 12-bit pc-relative reloc with 
+the right 3 bits assumed to be 0. */
+  BFD_RELOC_D30V_15_PCREL,
+
+/* This is an 18-bit absolute reloc with 
+the right 3 bits assumed to be 0. */
+  BFD_RELOC_D30V_21,
+
+/* This is an 18-bit pc-relative reloc with 
+the right 3 bits assumed to be 0. */
+  BFD_RELOC_D30V_21_PCREL,
+
+/* This is a 32-bit absolute reloc. */
+  BFD_RELOC_D30V_32,
+
+/* This is a 32-bit pc-relative reloc. */
+  BFD_RELOC_D30V_32_PCREL,
+/* end-sanitize-d30v */
+
 
 /* Mitsubishi M32R relocs.
 This is a 24 bit absolute address. */
@@ -1859,26 +1920,47 @@ This is a 24 bit absolute address. */
 /* 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. */
+/* This is a 26-bit reloc with the right 2 bits assumed to be 0. */
   BFD_RELOC_M32R_26_PCREL,
-/* end-sanitize-m32r */
 
+/* This is a 16-bit reloc containing the high 16 bits of an address
+used when the lower 16 bits are treated as unsigned. */
+  BFD_RELOC_M32R_HI16_ULO,
+
+/* This is a 16-bit reloc containing the high 16 bits of an address
+used when the lower 16 bits are treated as signed. */
+  BFD_RELOC_M32R_HI16_SLO,
+
+/* This is a 16-bit reloc containing the lower 16 bits of an address. */
+  BFD_RELOC_M32R_LO16,
+
+/* This is a 16-bit reloc containing the small data area offset for use in
+add3, load, and store instructions. */
+  BFD_RELOC_M32R_SDA16,
 /* start-sanitize-v850 */
 
 /* This is a 9-bit reloc */
   BFD_RELOC_V850_9_PCREL,
 
+/* This is a 16-bit reloc */
+  BFD_RELOC_V850_16_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,
+  BFD_RELOC_V850_SDA_16_16_OFFSET,             /* A 16 bit reloc in the small data area.  */
+  BFD_RELOC_V850_SDA_15_16_OFFSET,             /* A 16 bit reloc (of which only 15 bits are used) in the small data area.  */
+  BFD_RELOC_V850_ZDA_16_16_OFFSET,             /* A 16 bit reloc in the zero data area.  */
+  BFD_RELOC_V850_ZDA_15_16_OFFSET,             /* A 16 bit reloc (of which only 15 bits are used) in the zero data area.  */
+  BFD_RELOC_V850_TDA_6_8_OFFSET,               /* An 8 bit reloc (of which only 6 bits are used) in the tiny data area.  */
+  BFD_RELOC_V850_TDA_7_8_OFFSET,               /* An 8 bit reloc (of which only 7 bits are used) in the tiny data area.  */
+  BFD_RELOC_V850_TDA_7_7_OFFSET,               /* A  7 bit reloc in the tiny data area.  */
+/* start-sanitize-v850e */
+  BFD_RELOC_V850_TDA_4_5_OFFSET,               /* A  5 bit reloc (of which only 4 bits are used) in the tiny data area.  */
+  BFD_RELOC_V850_TDA_4_4_OFFSET,               /* A  4 bit reloc in the tiny data area.  */
+  BFD_RELOC_V850_SDA_16_16_SPLIT_OFFSET,       /* A 16 bit reloc (but the bits are not contiguous) in the small data area.  */
+  BFD_RELOC_V850_ZDA_16_16_SPLIT_OFFSET,       /* A 16 bit reloc (but the bits are not contiguous) in the zero data area.  */
+/* end-santize-v850e */
 /* end-sanitize-v850 */
 
 
@@ -2021,8 +2103,11 @@ typedef struct symbol_cache_entry
 boolean 
 bfd_is_local_label PARAMS ((bfd *abfd, asymbol *sym));
 
-#define bfd_is_local_label(abfd, sym) \
-     BFD_SEND (abfd, _bfd_is_local_label,(abfd, sym))
+boolean 
+bfd_is_local_label_name PARAMS ((bfd *abfd, const char *name));
+
+#define bfd_is_local_label_name(abfd, name) \
+     BFD_SEND (abfd, _bfd_is_local_label_name, (abfd, name))
 #define bfd_canonicalize_symtab(abfd, location) \
      BFD_SEND (abfd, _bfd_canonicalize_symtab,\
                   (abfd, location))
@@ -2198,8 +2283,10 @@ struct _bfd
      /* Used by the application to hold private data*/
     PTR usrdata;
 
-     /* Where all the allocated stuff under this BFD goes */
-    struct obstack memory;
+   /* Where all the allocated stuff under this BFD goes.  This is a
+     struct objalloc *, but we use PTR to avoid requiring the inclusion of
+     objalloc.h.  */
+    PTR memory;
 };
 
 typedef enum bfd_error
@@ -2551,7 +2638,7 @@ CAT(NAME,_get_symtab),\
 CAT(NAME,_make_empty_symbol),\
 CAT(NAME,_print_symbol),\
 CAT(NAME,_get_symbol_info),\
-CAT(NAME,_bfd_is_local_label),\
+CAT(NAME,_bfd_is_local_label_name),\
 CAT(NAME,_get_lineno),\
 CAT(NAME,_find_nearest_line),\
 CAT(NAME,_bfd_make_debug_symbol),\
@@ -2570,7 +2657,7 @@ CAT(NAME,_minisymbol_to_symbol)
                                       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) PARAMS ((bfd *, asymbol *));
+  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,
@@ -2666,6 +2753,9 @@ CAT(NAME,_canonicalize_dynamic_reloc)
 
  PTR backend_data;
 } bfd_target;
+boolean 
+bfd_set_default_target  PARAMS ((const char *name));
+
 const bfd_target *
 bfd_find_target PARAMS ((CONST char *target_name, bfd *abfd));
 
This page took 0.038474 seconds and 4 git commands to generate.