2001-09-11 H.J. Lu <hjl@gnu.org>
[deliverable/binutils-gdb.git] / bfd / bfd-in2.h
index bce9c0e9d1bb130aa9800d32856f2ddb6eb59b82..b725dd42adba13e5c5ae789f68a585cdf813d802 100644 (file)
@@ -52,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@
@@ -183,7 +190,11 @@ typedef unsigned long bfd_size_type;
 
 #endif /* not BFD64  */
 
+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;
@@ -298,7 +309,7 @@ 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
@@ -625,11 +636,11 @@ 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 *));
@@ -711,10 +722,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
@@ -1127,6 +1137,10 @@ 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;
 
@@ -1420,12 +1434,12 @@ 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_mips32                32
-#define bfd_mach_mips32_4k             3204113 /* 32, 04, octal 'K' */
 #define bfd_mach_mips5                 5
-#define bfd_mach_mips64                64
 #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
@@ -1854,10 +1868,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,
@@ -1923,7 +1939,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,
@@ -1998,24 +2016,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. */
@@ -2029,6 +2034,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,
@@ -2075,6 +2085,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 */
@@ -2154,6 +2175,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,
@@ -2654,6 +2698,8 @@ 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_SEGREL32MSB,
@@ -2766,6 +2812,13 @@ This is the 3 bits of a value. */
 /* 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 *
@@ -2914,7 +2967,7 @@ boolean
 bfd_set_symtab PARAMS ((bfd *abfd, asymbol **location, unsigned int count));
 
 void
-bfd_print_symbol_vandf PARAMS ((PTR file, asymbol *symbol));
+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))
@@ -2938,7 +2991,7 @@ bfd_copy_private_symbol_data PARAMS ((bfd *ibfd, asymbol *isym, bfd *obfd, asymb
 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;
@@ -3098,6 +3151,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,
@@ -3121,11 +3175,11 @@ bfd_get_error PARAMS ((void));
 void
 bfd_set_error PARAMS ((bfd_error_type error_tag));
 
-CONST char *
+const char *
 bfd_errmsg PARAMS ((bfd_error_type error_tag));
 
 void
-bfd_perror PARAMS ((CONST char *message));
+bfd_perror PARAMS ((const char *message));
 
 typedef void (*bfd_error_handler_type) PARAMS ((const char *, ...));
 
@@ -3170,14 +3224,14 @@ bfd_get_mtime PARAMS ((bfd *abfd));
 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));
+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_scan_vma PARAMS ((const char *string, const char **end, int base));
 
 boolean
 bfd_copy_private_bfd_data PARAMS ((bfd *ibfd, bfd *obfd));
@@ -3264,6 +3318,9 @@ extern bfd_byte *bfd_get_relocated_section_contents
                  struct bfd_link_order *, bfd_byte *,
                  boolean, asymbol **));
 
+boolean
+bfd_alt_mach_code PARAMS ((bfd *abfd, int index));
+
 symindex
 bfd_get_next_mapent PARAMS ((bfd *abfd, symindex previous, carsym **sym));
 
@@ -3603,7 +3660,7 @@ bfd_check_format_matches PARAMS ((bfd *abfd, bfd_format format, char ***matching
 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.027385 seconds and 4 git commands to generate.