2001-08-09 H.J. Lu <hjl@gnu.org>
[deliverable/binutils-gdb.git] / bfd / bfd-in2.h
index 601f351b71dfe1a12695a20a40613f6c1ded2853..ee45a95197bd2895e2f04061f63e8d7c7552bc47 100644 (file)
@@ -183,7 +183,13 @@ 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));
+extern void bfd_elf_sprintf_vma PARAMS ((bfd *, char *, bfd_vma));
+extern void bfd_elf_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 +304,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
@@ -514,6 +520,9 @@ extern int bfd_stat PARAMS ((bfd *abfd, struct stat *));
 
 #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,
           boolean, boolean, unsigned int, struct sec **));
@@ -622,11 +631,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 *));
@@ -1106,8 +1115,9 @@ typedef struct sec
      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.  */
+  /* 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.  */
@@ -1123,6 +1133,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;
 
@@ -1416,6 +1430,7 @@ 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' */
@@ -1538,6 +1553,7 @@ enum bfd_architecture
   bfd_arch_s390,      /* IBM s390 */
 #define bfd_mach_s390_esa      0
 #define bfd_mach_s390_esame    1
+  bfd_arch_openrisc,  /* OpenRISC */
   bfd_arch_last
   };
 
@@ -1918,7 +1934,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,
@@ -2070,6 +2088,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 */
@@ -2649,6 +2678,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,
@@ -2757,6 +2788,10 @@ This is the 3 bits of a value. */
   BFD_RELOC_860_HIGH,
   BFD_RELOC_860_HIGOT,
   BFD_RELOC_860_HIGOTOFF,
+
+/* OpenRISC Relocations. */
+  BFD_RELOC_OPENRISC_ABS_26,
+  BFD_RELOC_OPENRISC_REL_26,
   BFD_RELOC_UNUSED };
 typedef enum bfd_reloc_code_real bfd_reloc_code_real_type;
 reloc_howto_type *
@@ -2929,7 +2964,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;
@@ -3112,11 +3147,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 *, ...));
 
@@ -3168,7 +3203,7 @@ void
 bfd_set_gp_size PARAMS ((bfd *abfd, 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));
@@ -3220,6 +3255,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))
 
@@ -3516,7 +3554,8 @@ 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)
+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 *,
@@ -3543,6 +3582,9 @@ CAT(NAME,_bfd_gc_sections)
   /* Remove sections that are not referenced from the output.  */
   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)\
 CAT(NAME,_get_dynamic_symtab_upper_bound),\
This page took 0.02647 seconds and 4 git commands to generate.