* ld.texinfo: Document that fill values now use the four least
[deliverable/binutils-gdb.git] / bfd / bfd-in2.h
index 213ef842f278affc4da5a93a1b310d0e570e2a69..37dae3da465176a7b9c667c28b255a57428dfb0b 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
@@ -514,6 +525,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 +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 *));
@@ -1102,6 +1116,15 @@ typedef struct sec
      references found to any symbol in the section.  */
 #define SEC_CLINK 0x10000000
 
+  /* Attempt to merge identical entities in the section.
+     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.  */
+#define SEC_STRINGS 0x40000000
+
   /*  End of section flags.  */
 
   /* Some internal packed boolean fields.  */
@@ -1115,6 +1138,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;
 
@@ -1214,6 +1241,10 @@ typedef struct sec
 
   unsigned int lineno_count;
 
+  /* Entity size for merging purposes.  */
+
+  unsigned int entsize;
+
   /* Optional information about a COMDAT entry; NULL if not COMDAT.  */
 
   struct bfd_comdat_info *comdat;
@@ -1404,6 +1435,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' */
@@ -1526,6 +1558,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
   };
 
@@ -1906,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,
@@ -2058,6 +2093,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 */
@@ -2637,6 +2683,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,
@@ -2745,6 +2793,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 *
@@ -2917,7 +2969,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;
@@ -3077,6 +3129,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,
@@ -3100,11 +3153,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 *, ...));
 
@@ -3156,7 +3209,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));
@@ -3208,6 +3261,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))
 
@@ -3504,7 +3560,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 *,
@@ -3531,6 +3588,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),\
@@ -3575,7 +3635,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.026722 seconds and 4 git commands to generate.