* elfcode.h (NAME(bfd_elf,size_dynamic_sections)): Add soname
[deliverable/binutils-gdb.git] / bfd / bfd-in2.h
index 25adc05498518180e3dabf3c1efd5414ac39c0fa..408ca587ff6f657299960ec011e04d3f33e2de3a 100644 (file)
@@ -1,5 +1,5 @@
 /* Main header file for the bfd library -- portable access to object files.
-   Copyright 1990, 1991, 1992, 1993 Free Software Foundation, Inc.
+   Copyright 1990, 1991, 1992, 1993, 1994 Free Software Foundation, Inc.
    Contributed by Cygnus Support.
 
 ** NOTE: bfd.h and bfd-in2.h are GENERATED files.  Don't change them;
@@ -99,15 +99,16 @@ typedef enum bfd_boolean {bfd_false, bfd_true} boolean;
 /* typedef off_t       file_ptr; */
 typedef long int file_ptr;
 
-/* Support for different sizes of target format ints and addresses.  If the
-   host implements 64-bit values, it defines BFD_HOST_64_BIT to be the appropriate
-   type.  Otherwise, this code will fall back on gcc's "long long" type if gcc
-   is being used.  BFD_HOST_64_BIT must be defined in such a way as to be a valid
-   type name by itself or with "unsigned" prefixed.  It should be a signed
-   type by itself.
+/* Support for different sizes of target format ints and addresses.
+   If the host implements 64-bit values, it defines BFD_HOST_64_BIT to
+   be the appropriate type.  Otherwise, this code will fall back on
+   gcc's "long long" type if gcc is being used.  BFD_HOST_64_BIT must
+   be defined in such a way as to be a valid type name by itself or
+   with "unsigned" prefixed.  It should be a signed type by itself.
 
-   If neither is the case, then compilation will fail if 64-bit targets are
-   requested.  If you don't request any 64-bit targets, you should be safe. */
+   If neither is the case, then compilation will fail if 64-bit
+   targets are requested.  If you don't request any 64-bit targets,
+   you should be safe. */
 
 #ifdef BFD64
 
@@ -213,8 +214,15 @@ typedef enum bfd_format {
 #define D_PAGED        0x100
 
 /* BFD is relaxable (this means that bfd_relax_section may be able to
-   do something).  */
+   do something) (sometimes bfd_relax_section can do something even if
+   this is not set).  */
 #define BFD_IS_RELAXABLE 0x200
+
+/* This may be set before writing out a BFD to request using a
+   traditional format.  For example, this is used to request that when
+   writing out an a.out object the symbols not be hashed to eliminate
+   duplicates.  */
+#define BFD_TRADITIONAL_FORMAT 0x400
 \f
 /* symbols and relocation */
 
@@ -265,7 +273,6 @@ typedef struct lineno_cache_entry {
 \f
 /* object and core file sections */
 
-
 #define        align_power(addr, align)        \
        ( ((addr) + ((1<<(align))-1)) & (-1 << (align)))
 
@@ -389,11 +396,6 @@ extern void bfd_hash_traverse PARAMS ((struct bfd_hash_table *,
                                                    PTR),
                                       PTR info));
 \f
-/* The code that implements targets can initialize a jump table with this
-   macro.  It must name all its routines the same way (a prefix plus
-   the standard routine suffix), or it must #define the routines that
-   are not so named, before calling JUMP_TABLE in the initializer.  */
-
 /* Semi-portable string concatenation in cpp.
    The CAT4 hack is to avoid a problem with some strict ANSI C preprocessors.
    The problem is, "32_" is not a valid preprocessing token, and we don't
@@ -419,50 +421,22 @@ extern void bfd_hash_traverse PARAMS ((struct bfd_hash_table *,
 #endif
 #endif
 
-#define JUMP_TABLE(NAME)\
-CAT(NAME,_core_file_failing_command),\
-CAT(NAME,_core_file_failing_signal),\
-CAT(NAME,_core_file_matches_executable_p),\
-CAT(NAME,_slurp_armap),\
-CAT(NAME,_slurp_extended_name_table),\
-CAT(NAME,_truncate_arname),\
-CAT(NAME,_write_armap),\
-CAT(NAME,_close_and_cleanup),\
-CAT(NAME,_set_section_contents),\
-CAT(NAME,_get_section_contents),\
-CAT(NAME,_new_section_hook),\
-CAT(NAME,_bfd_copy_private_section_data),\
-CAT(NAME,_bfd_copy_private_bfd_data),\
-CAT(NAME,_get_symtab_upper_bound),\
-CAT(NAME,_get_symtab),\
-CAT(NAME,_get_reloc_upper_bound),\
-CAT(NAME,_canonicalize_reloc),\
-CAT(NAME,_make_empty_symbol),\
-CAT(NAME,_print_symbol),\
-CAT(NAME,_get_symbol_info),\
-CAT(NAME,_bfd_is_local_label),\
-CAT(NAME,_get_lineno),\
-CAT(NAME,_set_arch_mach),\
-CAT(NAME,_openr_next_archived_file),\
-CAT(NAME,_find_nearest_line),\
-CAT(NAME,_generic_stat_arch_elt),\
-CAT(NAME,_sizeof_headers),\
-CAT(NAME,_bfd_debug_info_start),\
-CAT(NAME,_bfd_debug_info_end),\
-CAT(NAME,_bfd_debug_info_accumulate),\
-CAT(NAME,_bfd_get_relocated_section_contents),\
-CAT(NAME,_bfd_relax_section),\
-CAT(NAME,_bfd_reloc_type_lookup),\
-CAT(NAME,_bfd_make_debug_symbol),\
-CAT(NAME,_bfd_link_hash_table_create),\
-CAT(NAME,_bfd_link_add_symbols),\
-CAT(NAME,_bfd_final_link)
-
 #define COFF_SWAP_TABLE (PTR) &bfd_coff_std_swap_table
-
 \f
 /* User program access to BFD facilities */
 
+/* Direct I/O routines, for programs which know more about the object
+   file than BFD does.  Use higher level routines if possible.  */
+
+extern bfd_size_type bfd_read
+  PARAMS ((PTR, bfd_size_type size, bfd_size_type nitems, bfd *abfd));
+extern bfd_size_type bfd_write
+  PARAMS ((const PTR, bfd_size_type size, bfd_size_type nitems, bfd *abfd));
+extern int bfd_seek PARAMS ((bfd *abfd, const file_ptr fp, int direction));
+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)
@@ -508,8 +482,9 @@ void                bfd_putb32         PARAMS ((bfd_vma, unsigned char *));
 void           bfd_putl32         PARAMS ((bfd_vma, unsigned char *));
 void           bfd_putb16         PARAMS ((bfd_vma, unsigned char *));
 void           bfd_putl16         PARAMS ((bfd_vma, unsigned char *));
+\f
+/* Externally visible ECOFF routines.  */
 
-/* ECOFF linking routines.  */
 #if defined(__STDC__) || defined(ALMOST_STDC)
 struct ecoff_debug_info;
 struct ecoff_debug_swap;
@@ -517,6 +492,11 @@ struct ecoff_extr;
 struct symbol_cache_entry;
 struct bfd_link_info;
 #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));
+extern boolean bfd_ecoff_set_regmasks
+  PARAMS ((bfd *abfd, unsigned long gprmask, unsigned long fprmask,
+          unsigned long *cprmask));
 extern PTR bfd_ecoff_debug_init
   PARAMS ((bfd *output_bfd, struct ecoff_debug_info *output_debug,
           const struct ecoff_debug_swap *output_swap,
@@ -558,6 +538,33 @@ extern boolean bfd_ecoff_write_accumulated_debug
           const struct ecoff_debug_swap *swap,
           struct bfd_link_info *info, file_ptr where));
 
+/* Externally visible ELF routines.  */
+
+extern boolean bfd_elf32_record_link_assignment
+  PARAMS ((bfd *, struct bfd_link_info *, const char *));
+extern boolean bfd_elf64_record_link_assignment
+  PARAMS ((bfd *, struct bfd_link_info *, const char *));
+extern boolean bfd_elf32_size_dynamic_sections
+  PARAMS ((bfd *, const char *, const char *, struct bfd_link_info *,
+          struct sec **));
+extern boolean bfd_elf64_size_dynamic_sections
+  PARAMS ((bfd *, const char *, const char *, struct bfd_link_info *,
+          struct sec **));
+extern void bfd_elf_set_dt_needed_name PARAMS ((bfd *, const char *));
+
+/* SunOS shared library support routines for the linker.  */
+
+extern boolean bfd_sunos_record_link_assignment
+  PARAMS ((bfd *, struct bfd_link_info *, const char *));
+extern boolean bfd_sunos_size_dynamic_sections
+  PARAMS ((bfd *, struct bfd_link_info *, struct sec **, struct sec **,
+          struct sec **));
+
+/* Linux shared library support routines for the linker.  */
+
+extern boolean bfd_linux_size_dynamic_sections
+  PARAMS ((bfd *, struct bfd_link_info *));
+
 /* And more from the source.  */
 void 
 bfd_init PARAMS ((void));
@@ -738,19 +745,25 @@ typedef struct sec
 #define SEC_HAS_CONTENTS 0x200
 
          /* An instruction to the linker to not output the section
-          even if it has information which would normally be written. */
+           even if it has information which would normally be written. */
 #define SEC_NEVER_LOAD 0x400
 
-         /* The section is a shared library section.  The linker must leave
-           these completely alone, as the vma and size are used when
-           the executable is loaded. */
-#define SEC_SHARED_LIBRARY 0x800
+         /* The section is a COFF shared library section.  This flag is
+           only for the linker.  If this type of section appears in
+           the input file, the linker must copy it to the output file
+           without changing the vma or size.  FIXME: Although this
+           was originally intended to be general, it really is COFF
+           specific (and the flag was renamed to indicate this).  It
+           might be cleaner to have some more general mechanism to
+           allow the back end to control what the linker does with
+           sections. */
+#define SEC_COFF_SHARED_LIBRARY 0x800
 
          /* The section is a common section (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
            used).  Most targets have exactly one of these (which we
-           translate to bfd_com_section), but ECOFF has two. */
+           translate to bfd_com_section_ptr), but ECOFF has two. */
 #define SEC_IS_COMMON 0x8000
 
          /* The section contains only debugging information.  For
@@ -885,28 +898,36 @@ typedef struct sec
    struct bfd_link_order *link_order_tail;
 } asection ;
 
-
      /* These sections are global, and are managed by BFD.  The application
        and target back end are not permitted to change the values in
-       these sections.  */
+       these sections.  New code should use the section_ptr macros rather
+       than referring directly to the const sections.  The const sections
+       may eventually vanish.  */
 #define BFD_ABS_SECTION_NAME "*ABS*"
 #define BFD_UND_SECTION_NAME "*UND*"
 #define BFD_COM_SECTION_NAME "*COM*"
 #define BFD_IND_SECTION_NAME "*IND*"
 
      /* the absolute section */
-extern asection bfd_abs_section;
+extern const asection bfd_abs_section;
+#define bfd_abs_section_ptr ((asection *) &bfd_abs_section)
+#define bfd_is_abs_section(sec) ((sec) == bfd_abs_section_ptr)
      /* Pointer to the undefined section */
-extern asection bfd_und_section;
+extern const asection bfd_und_section;
+#define bfd_und_section_ptr ((asection *) &bfd_und_section)
+#define bfd_is_und_section(sec) ((sec) == bfd_und_section_ptr)
      /* Pointer to the common section */
-extern asection bfd_com_section;
+extern const asection bfd_com_section;
+#define bfd_com_section_ptr ((asection *) &bfd_com_section)
      /* Pointer to the indirect section */
-extern asection bfd_ind_section;
-
-extern struct symbol_cache_entry *bfd_abs_symbol;
-extern struct symbol_cache_entry *bfd_com_symbol;
-extern struct symbol_cache_entry *bfd_und_symbol;
-extern struct symbol_cache_entry *bfd_ind_symbol;
+extern const asection bfd_ind_section;
+#define bfd_ind_section_ptr ((asection *) &bfd_ind_section)
+#define bfd_is_ind_section(sec) ((sec) == bfd_ind_section_ptr)
+
+extern const struct symbol_cache_entry * const bfd_abs_symbol;
+extern const struct symbol_cache_entry * const bfd_com_symbol;
+extern const struct symbol_cache_entry * const bfd_und_symbol;
+extern const struct symbol_cache_entry * const bfd_ind_symbol;
 #define bfd_get_section_size_before_reloc(section) \
      (section->reloc_done ? (abort(),1): (section)->_raw_size)
 #define bfd_get_section_size_after_reloc(section) \
@@ -976,6 +997,9 @@ enum bfd_architecture
 #define bfd_mach_i960_mc        4
 #define bfd_mach_i960_xa        5
 #define bfd_mach_i960_ca        6
+  /* start-sanitize-i960xl */
+#define bfd_mach_i960_xl        7
+  /* end-sanitize-i960xl */
 
   bfd_arch_a29k,       /* AMD 29000 */
   bfd_arch_sparc,      /* SPARC */
@@ -1001,6 +1025,7 @@ enum bfd_architecture
   bfd_arch_h8500,      /* Hitachi H8/500 */
   bfd_arch_sh,         /* Hitachi SH */
   bfd_arch_alpha,      /* Dec Alpha */
+  bfd_arch_ns32k,      /* National Semiconductors ns32000 */
   bfd_arch_last
   };
 
@@ -1135,7 +1160,10 @@ enum complain_overflow
   complain_overflow_unsigned
 };
 
-typedef struct reloc_howto_struct
+typedef unsigned char bfd_byte;
+typedef struct reloc_howto_struct reloc_howto_type;
+
+struct reloc_howto_struct
 {
         /*  The type field has mainly a documetary use - the back end can
            do what it wants with it, though normally the back end's
@@ -1215,7 +1243,7 @@ typedef struct reloc_howto_struct
           empty (e.g., m88k bcs); this flag signals the fact.*/
   boolean pcrel_offset;
 
-} reloc_howto_type;
+};
 #define HOWTO(C, R,S,B, P, BI, O, SF, NAME, INPLACE, MASKSRC, MASKDST, PC) \
   {(unsigned)C,R,S,B, P, BI, O,SF,NAME,INPLACE,MASKSRC,MASKDST,PC}
 #define NEWHOWTO( FUNCTION, NAME,SIZE,REL,IN) HOWTO(0,0,SIZE,0,REL,0,complain_overflow_dont,FUNCTION, NAME,false,0,0,IN)
@@ -1234,8 +1262,6 @@ typedef struct reloc_howto_struct
 int 
 bfd_get_reloc_size  PARAMS ((const reloc_howto_type *));
 
-typedef unsigned char bfd_byte;
-
 typedef struct relent_chain {
   arelent relent;
   struct   relent_chain *next;
@@ -1324,7 +1350,8 @@ typedef enum bfd_reloc_code_real
   BFD_RELOC_SPARC_BASE13,
   BFD_RELOC_SPARC_BASE22,
 
-   /* start-sanitize-v9 */
+   /* some relocations we're using for sparc v9
+     -- subject to change */
   BFD_RELOC_SPARC_10,
   BFD_RELOC_SPARC_11,
 #define  BFD_RELOC_SPARC_64 BFD_RELOC_64
@@ -1339,7 +1366,6 @@ typedef enum bfd_reloc_code_real
   BFD_RELOC_SPARC_WDISP19,
   BFD_RELOC_SPARC_GLOB_JMP,
   BFD_RELOC_SPARC_LO7,
-   /* end-sanitize-v9 */
 
    /* Alpha ECOFF relocations.  Some of these treat the symbol or "addend"
      in some special way.  */
@@ -1394,6 +1420,10 @@ typedef enum bfd_reloc_code_real
   BFD_RELOC_HI16_S,
    /* Low 16 bits.  */
   BFD_RELOC_LO16,
+   /* Like BFD_RELOC_HI16_S, but PC relative.  */
+  BFD_RELOC_PCREL_HI16_S,
+   /* Like BFD_RELOC_LO16, but PC relative.  */
+  BFD_RELOC_PCREL_LO16,
 
    /* relocation relative to the global pointer.  */
 #define BFD_RELOC_MIPS_GPREL BFD_RELOC_GPREL16
@@ -1406,103 +1436,6 @@ typedef enum bfd_reloc_code_real
   BFD_RELOC_MIPS_CALL16,
 #define BFD_RELOC_MIPS_GPREL32 BFD_RELOC_GPREL32
 
-   /* These are, so far, specific to HPPA processors.  I'm not sure that some
-     don't duplicate other reloc types, such as BFD_RELOC_32 and _32_PCREL.
-     Also, many more were in the list I got that don't fit in well in the
-     model BFD uses, so I've omitted them for now.  If we do make this reloc
-     type get used for code that really does implement the funky reloc types,
-     they'll have to be added to this list.  */
-  BFD_RELOC_HPPA_32,
-  BFD_RELOC_HPPA_11,
-  BFD_RELOC_HPPA_14,
-  BFD_RELOC_HPPA_17,
-
-  BFD_RELOC_HPPA_L21,
-  BFD_RELOC_HPPA_R11,
-  BFD_RELOC_HPPA_R14,
-  BFD_RELOC_HPPA_R17,
-  BFD_RELOC_HPPA_LS21,
-  BFD_RELOC_HPPA_RS11,
-  BFD_RELOC_HPPA_RS14,
-  BFD_RELOC_HPPA_RS17,
-  BFD_RELOC_HPPA_LD21,
-  BFD_RELOC_HPPA_RD11,
-  BFD_RELOC_HPPA_RD14,
-  BFD_RELOC_HPPA_RD17,
-  BFD_RELOC_HPPA_LR21,
-  BFD_RELOC_HPPA_RR14,
-  BFD_RELOC_HPPA_RR17,
-
-  BFD_RELOC_HPPA_GOTOFF_11,
-  BFD_RELOC_HPPA_GOTOFF_14,
-  BFD_RELOC_HPPA_GOTOFF_L21,
-  BFD_RELOC_HPPA_GOTOFF_R11,
-  BFD_RELOC_HPPA_GOTOFF_R14,
-  BFD_RELOC_HPPA_GOTOFF_LS21,
-  BFD_RELOC_HPPA_GOTOFF_RS11,
-  BFD_RELOC_HPPA_GOTOFF_RS14,
-  BFD_RELOC_HPPA_GOTOFF_LD21,
-  BFD_RELOC_HPPA_GOTOFF_RD11,
-  BFD_RELOC_HPPA_GOTOFF_RD14,
-  BFD_RELOC_HPPA_GOTOFF_LR21,
-  BFD_RELOC_HPPA_GOTOFF_RR14,
-
-  BFD_RELOC_HPPA_DLT_32,
-  BFD_RELOC_HPPA_DLT_11,
-  BFD_RELOC_HPPA_DLT_14,
-  BFD_RELOC_HPPA_DLT_L21,
-  BFD_RELOC_HPPA_DLT_R11,
-  BFD_RELOC_HPPA_DLT_R14,
-
-  BFD_RELOC_HPPA_ABS_CALL_11,
-  BFD_RELOC_HPPA_ABS_CALL_14,
-  BFD_RELOC_HPPA_ABS_CALL_17,
-  BFD_RELOC_HPPA_ABS_CALL_L21,
-  BFD_RELOC_HPPA_ABS_CALL_R11,
-  BFD_RELOC_HPPA_ABS_CALL_R14,
-  BFD_RELOC_HPPA_ABS_CALL_R17,
-  BFD_RELOC_HPPA_ABS_CALL_LS21,
-  BFD_RELOC_HPPA_ABS_CALL_RS11,
-  BFD_RELOC_HPPA_ABS_CALL_RS14,
-  BFD_RELOC_HPPA_ABS_CALL_RS17,
-  BFD_RELOC_HPPA_ABS_CALL_LD21,
-  BFD_RELOC_HPPA_ABS_CALL_RD11,
-  BFD_RELOC_HPPA_ABS_CALL_RD14,
-  BFD_RELOC_HPPA_ABS_CALL_RD17,
-  BFD_RELOC_HPPA_ABS_CALL_LR21,
-  BFD_RELOC_HPPA_ABS_CALL_RR14,
-  BFD_RELOC_HPPA_ABS_CALL_RR17,
-
-  BFD_RELOC_HPPA_PCREL_CALL_11,
-  BFD_RELOC_HPPA_PCREL_CALL_12,
-  BFD_RELOC_HPPA_PCREL_CALL_14,
-  BFD_RELOC_HPPA_PCREL_CALL_17,
-  BFD_RELOC_HPPA_PCREL_CALL_L21,
-  BFD_RELOC_HPPA_PCREL_CALL_R11,
-  BFD_RELOC_HPPA_PCREL_CALL_R14,
-  BFD_RELOC_HPPA_PCREL_CALL_R17,
-  BFD_RELOC_HPPA_PCREL_CALL_LS21,
-  BFD_RELOC_HPPA_PCREL_CALL_RS11,
-  BFD_RELOC_HPPA_PCREL_CALL_RS14,
-  BFD_RELOC_HPPA_PCREL_CALL_RS17,
-  BFD_RELOC_HPPA_PCREL_CALL_LD21,
-  BFD_RELOC_HPPA_PCREL_CALL_RD11,
-  BFD_RELOC_HPPA_PCREL_CALL_RD14,
-  BFD_RELOC_HPPA_PCREL_CALL_RD17,
-  BFD_RELOC_HPPA_PCREL_CALL_LR21,
-  BFD_RELOC_HPPA_PCREL_CALL_RR14,
-  BFD_RELOC_HPPA_PCREL_CALL_RR17,
-
-  BFD_RELOC_HPPA_PLABEL_32,
-  BFD_RELOC_HPPA_PLABEL_11,
-  BFD_RELOC_HPPA_PLABEL_14,
-  BFD_RELOC_HPPA_PLABEL_L21,
-  BFD_RELOC_HPPA_PLABEL_R11,
-  BFD_RELOC_HPPA_PLABEL_R14,
-
-  BFD_RELOC_HPPA_UNWIND_ENTRY,
-  BFD_RELOC_HPPA_UNWIND_ENTRIES,
-
    /* i386/elf relocations */
   BFD_RELOC_386_GOT32,
   BFD_RELOC_386_PLT32,
@@ -1513,6 +1446,20 @@ typedef enum bfd_reloc_code_real
   BFD_RELOC_386_GOTOFF,
   BFD_RELOC_386_GOTPC,
 
+   /* ns32k relocations */
+  BFD_RELOC_NS32K_IMM_8,
+  BFD_RELOC_NS32K_IMM_16,
+  BFD_RELOC_NS32K_IMM_32,
+  BFD_RELOC_NS32K_IMM_8_PCREL,
+  BFD_RELOC_NS32K_IMM_16_PCREL,
+  BFD_RELOC_NS32K_IMM_32_PCREL,
+  BFD_RELOC_NS32K_DISP_8,
+  BFD_RELOC_NS32K_DISP_16,
+  BFD_RELOC_NS32K_DISP_32,
+  BFD_RELOC_NS32K_DISP_8_PCREL,
+  BFD_RELOC_NS32K_DISP_16_PCREL,
+  BFD_RELOC_NS32K_DISP_32_PCREL,
+
    /* PowerPC/POWER (RS/6000) relocs.  */
    /* 26 bit relative branch.  Low two bits must be zero.  High 24
      bits installed in bits 6 through 29 of instruction.  */
@@ -1673,7 +1620,7 @@ struct _bfd
     CONST char *filename;                
 
      /* A pointer to the target jump table.             */
-    struct bfd_target *xvec;
+    const struct bfd_target *xvec;
 
      /* To avoid dragging too many header files into every file that
        includes `<<bfd.h>>', IOSTREAM has been declared as a "char
@@ -1910,6 +1857,9 @@ bfd_copy_private_bfd_data PARAMS ((bfd *ibfd, bfd *obfd));
 #define bfd_stat_arch_elt(abfd, stat) \
         BFD_SEND (abfd, _bfd_stat_arch_elt,(abfd, stat))
 
+#define bfd_update_armap_timestamp(abfd) \
+        BFD_SEND (abfd, _bfd_update_armap_timestamp, (abfd))
+
 #define bfd_set_arch_mach(abfd, arch, mach)\
         BFD_SEND ( abfd, _bfd_set_arch_mach, (abfd, arch, mach))
 
@@ -1929,6 +1879,21 @@ bfd_copy_private_bfd_data PARAMS ((bfd *ibfd, bfd *obfd));
 #define bfd_final_link(abfd, info) \
        BFD_SEND (abfd, _bfd_final_link, (abfd, info))
 
+#define bfd_free_cached_info(abfd) \
+       BFD_SEND (abfd, _bfd_free_cached_info, (abfd))
+
+#define bfd_get_dynamic_symtab_upper_bound(abfd) \
+       BFD_SEND (abfd, _bfd_get_dynamic_symtab_upper_bound, (abfd))
+
+#define bfd_canonicalize_dynamic_symtab(abfd, asymbols) \
+       BFD_SEND (abfd, _bfd_canonicalize_dynamic_symtab, (abfd, asymbols))
+
+#define bfd_get_dynamic_reloc_upper_bound(abfd) \
+       BFD_SEND (abfd, _bfd_get_dynamic_reloc_upper_bound, (abfd))
+
+#define bfd_canonicalize_dynamic_reloc(abfd, arels, asyms) \
+       BFD_SEND (abfd, _bfd_canonicalize_dynamic_reloc, (abfd, arels, asyms))
+
 symindex 
 bfd_get_next_mapent PARAMS ((bfd *abfd, symindex previous, carsym **sym));
 
@@ -2018,12 +1983,56 @@ typedef struct bfd_target
   bfd_vma      (*bfd_h_getx16) PARAMS ((const bfd_byte *));
   bfd_signed_vma (*bfd_h_getx_signed_16) PARAMS ((const bfd_byte *));
   void         (*bfd_h_putx16) PARAMS ((bfd_vma, bfd_byte *));
-  struct bfd_target * (*_bfd_check_format[bfd_type_end]) PARAMS ((bfd *));
+  const struct bfd_target *(*_bfd_check_format[bfd_type_end]) PARAMS ((bfd *));
   boolean             (*_bfd_set_format[bfd_type_end]) PARAMS ((bfd *));
   boolean             (*_bfd_write_contents[bfd_type_end]) PARAMS ((bfd *));
+
+   /* Generic entry points.  */
+#define BFD_JUMP_TABLE_GENERIC(NAME)\
+CAT(NAME,_close_and_cleanup),\
+CAT(NAME,_bfd_free_cached_info),\
+CAT(NAME,_new_section_hook),\
+CAT(NAME,_get_section_contents)
+   /* Called when the BFD is being closed to do any necessary cleanup.  */
+  boolean       (*_close_and_cleanup) PARAMS ((bfd *));
+   /* Ask the BFD to free all cached information.  */
+  boolean (*_bfd_free_cached_info) PARAMS ((bfd *));
+   /* Called when a new section is created.  */
+  boolean       (*_new_section_hook) PARAMS ((bfd *, sec_ptr));
+   /* Read the contents of a section.  */
+  boolean       (*_bfd_get_section_contents) PARAMS ((bfd *, sec_ptr, PTR, 
+                                            file_ptr, bfd_size_type));
+
+   /* Entry points to copy private data.  */
+#define BFD_JUMP_TABLE_COPY(NAME)\
+CAT(NAME,_bfd_copy_private_bfd_data),\
+CAT(NAME,_bfd_copy_private_section_data)
+   /* Called to copy BFD general private data from one object file
+     to another.  */
+  boolean       (*_bfd_copy_private_bfd_data) PARAMS ((bfd *, bfd *));
+   /* Called to copy BFD private section data from one object file
+     to another.  */
+  boolean       (*_bfd_copy_private_section_data) PARAMS ((bfd *, sec_ptr,
+                                                       bfd *, sec_ptr));
+
+   /* Core file entry points.  */
+#define BFD_JUMP_TABLE_CORE(NAME)\
+CAT(NAME,_core_file_failing_command),\
+CAT(NAME,_core_file_failing_signal),\
+CAT(NAME,_core_file_matches_executable_p)
   char *   (*_core_file_failing_command) PARAMS ((bfd *));
   int      (*_core_file_failing_signal) PARAMS ((bfd *));
   boolean  (*_core_file_matches_executable_p) PARAMS ((bfd *, bfd *));
+
+   /* Archive entry points.  */
+#define BFD_JUMP_TABLE_ARCHIVE(NAME)\
+CAT(NAME,_slurp_armap),\
+CAT(NAME,_slurp_extended_name_table),\
+CAT(NAME,_truncate_arname),\
+CAT(NAME,_write_armap),\
+CAT(NAME,_openr_next_archived_file),\
+CAT(NAME,_generic_stat_arch_elt),\
+CAT(NAME,_update_armap_timestamp)
   boolean  (*_bfd_slurp_armap) PARAMS ((bfd *));
   boolean  (*_bfd_slurp_extended_name_table) PARAMS ((bfd *));
   void     (*_bfd_truncate_arname) PARAMS ((bfd *, CONST char *, char *));
@@ -2032,21 +2041,24 @@ typedef struct bfd_target
                               struct orl *map,
                               unsigned int orl_count, 
                               int stridx));
-  boolean       (*_close_and_cleanup) PARAMS ((bfd *));
-  boolean       (*_bfd_set_section_contents) PARAMS ((bfd *, sec_ptr, PTR,
-                                            file_ptr, bfd_size_type));
-  boolean       (*_bfd_get_section_contents) PARAMS ((bfd *, sec_ptr, PTR, 
-                                            file_ptr, bfd_size_type));
-  boolean       (*_new_section_hook) PARAMS ((bfd *, sec_ptr));
-  boolean       (*_bfd_copy_private_section_data) PARAMS ((bfd *, sec_ptr,
-                                                       bfd *, sec_ptr));
-  boolean       (*_bfd_copy_private_bfd_data) PARAMS ((bfd *, bfd *));
+  bfd *    (*openr_next_archived_file) PARAMS ((bfd *arch, bfd *prev));
+  int      (*_bfd_stat_arch_elt) PARAMS ((bfd *, struct stat *));
+  boolean  (*_bfd_update_armap_timestamp) PARAMS ((bfd *));
+
+   /* Entry points used for symbols.  */
+#define BFD_JUMP_TABLE_SYMBOLS(NAME)\
+CAT(NAME,_get_symtab_upper_bound),\
+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,_get_lineno),\
+CAT(NAME,_find_nearest_line),\
+CAT(NAME,_bfd_make_debug_symbol)
   long  (*_bfd_get_symtab_upper_bound) PARAMS ((bfd *));
   long  (*_bfd_canonicalize_symtab) PARAMS ((bfd *,
                                              struct symbol_cache_entry **));
-  long  (*_get_reloc_upper_bound) PARAMS ((bfd *, sec_ptr));
-  long  (*_bfd_canonicalize_reloc) PARAMS ((bfd *, sec_ptr, arelent **,
-                                            struct symbol_cache_entry **));
   struct symbol_cache_entry  *
                 (*_bfd_make_empty_symbol) PARAMS ((bfd *));
   void          (*_bfd_print_symbol) PARAMS ((bfd *, PTR,
@@ -2058,26 +2070,51 @@ typedef struct bfd_target
                                       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 *));
-  alent *    (*_get_lineno) PARAMS ((bfd *, struct symbol_cache_entry *));
-
-  boolean    (*_bfd_set_arch_mach) PARAMS ((bfd *, enum bfd_architecture,
-                    unsigned long));
 
-  bfd *      (*openr_next_archived_file) PARAMS ((bfd *arch, bfd *prev));
+  alent *    (*_get_lineno) PARAMS ((bfd *, struct symbol_cache_entry *));
   boolean    (*_bfd_find_nearest_line) PARAMS ((bfd *abfd,
                     struct sec *section, struct symbol_cache_entry **symbols,
                     bfd_vma offset, CONST char **file, CONST char **func,
                     unsigned int *line));
-  int        (*_bfd_stat_arch_elt) PARAMS ((bfd *, struct stat *));
+  /* Back-door to allow format-aware applications to create debug symbols
+    while using BFD for everything else.  Currently used by the assembler
+    when creating COFF files.  */
+ asymbol *  (*_bfd_make_debug_symbol) PARAMS ((
+       bfd *abfd,
+       void *ptr,
+       unsigned long size));
 
-  int        (*_bfd_sizeof_headers) PARAMS ((bfd *, boolean));
+   /* Routines for relocs.  */
+#define BFD_JUMP_TABLE_RELOCS(NAME)\
+CAT(NAME,_get_reloc_upper_bound),\
+CAT(NAME,_canonicalize_reloc),\
+CAT(NAME,_bfd_reloc_type_lookup)
+  long  (*_get_reloc_upper_bound) PARAMS ((bfd *, sec_ptr));
+  long  (*_bfd_canonicalize_reloc) PARAMS ((bfd *, sec_ptr, arelent **,
+                                            struct symbol_cache_entry **));
+   /* See documentation on reloc types.  */
+  CONST struct reloc_howto_struct *
+       (*reloc_type_lookup) PARAMS ((bfd *abfd,
+                                     bfd_reloc_code_real_type code));
 
-  void       (*_bfd_debug_info_start) PARAMS ((bfd *));
-  void       (*_bfd_debug_info_end) PARAMS ((bfd *));
-  void       (*_bfd_debug_info_accumulate) PARAMS ((bfd *, struct sec *));
+   /* Routines used when writing an object file.  */
+#define BFD_JUMP_TABLE_WRITE(NAME)\
+CAT(NAME,_set_arch_mach),\
+CAT(NAME,_set_section_contents)
+  boolean    (*_bfd_set_arch_mach) PARAMS ((bfd *, enum bfd_architecture,
+                    unsigned long));
+  boolean       (*_bfd_set_section_contents) PARAMS ((bfd *, sec_ptr, PTR,
+                                            file_ptr, bfd_size_type));
 
+   /* Routines used by the linker.  */
+#define BFD_JUMP_TABLE_LINK(NAME)\
+CAT(NAME,_sizeof_headers),\
+CAT(NAME,_bfd_get_relocated_section_contents),\
+CAT(NAME,_bfd_relax_section),\
+CAT(NAME,_bfd_link_hash_table_create),\
+CAT(NAME,_bfd_link_add_symbols),\
+CAT(NAME,_bfd_final_link)
+  int        (*_bfd_sizeof_headers) PARAMS ((bfd *, boolean));
   bfd_byte * (*_bfd_get_relocated_section_contents) PARAMS ((bfd *,
                     struct bfd_link_info *, struct bfd_link_order *,
                     bfd_byte *data, boolean relocateable,
@@ -2086,36 +2123,40 @@ typedef struct bfd_target
   boolean    (*_bfd_relax_section) PARAMS ((bfd *, struct sec *,
                     struct bfd_link_info *, boolean *again));
 
-  /* See documentation on reloc types.  */
- CONST struct reloc_howto_struct *
-       (*reloc_type_lookup) PARAMS ((bfd *abfd,
-                                     bfd_reloc_code_real_type code));
-
-  /* Back-door to allow format-aware applications to create debug symbols
-    while using BFD for everything else.  Currently used by the assembler
-    when creating COFF files.  */
- asymbol *  (*_bfd_make_debug_symbol) PARAMS ((
-       bfd *abfd,
-       void *ptr,
-       unsigned long size));
-
-  /* Create a hash table for the linker.  Different backends store
-    different information in this table.  */
- struct bfd_link_hash_table *(*_bfd_link_hash_table_create) PARAMS ((bfd *));
-
-  /* Add symbols from this object file into the hash table.  */
- boolean (*_bfd_link_add_symbols) PARAMS ((bfd *, struct bfd_link_info *));
-
-  /* Do a link based on the link_order structures attached to each
-    section of the BFD.  */
- boolean (*_bfd_final_link) PARAMS ((bfd *, struct bfd_link_info *));
+   /* Create a hash table for the linker.  Different backends store
+     different information in this table.  */
+  struct bfd_link_hash_table *(*_bfd_link_hash_table_create) PARAMS ((bfd *));
+
+   /* Add symbols from this object file into the hash table.  */
+  boolean (*_bfd_link_add_symbols) PARAMS ((bfd *, struct bfd_link_info *));
+
+   /* Do a link based on the link_order structures attached to each
+     section of the BFD.  */
+  boolean (*_bfd_final_link) 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),\
+CAT(NAME,_canonicalize_dynamic_symtab),\
+CAT(NAME,_get_dynamic_reloc_upper_bound),\
+CAT(NAME,_canonicalize_dynamic_reloc)
+   /* Get the amount of memory required to hold the dynamic symbols. */
+  long  (*_bfd_get_dynamic_symtab_upper_bound) PARAMS ((bfd *));
+   /* Read in the dynamic symbols.  */
+  long  (*_bfd_canonicalize_dynamic_symtab)
+    PARAMS ((bfd *, struct symbol_cache_entry **));
+   /* Get the amount of memory required to hold the dynamic relocs.  */
+  long  (*_bfd_get_dynamic_reloc_upper_bound) PARAMS ((bfd *));
+   /* Read in the dynamic relocs.  */
+  long  (*_bfd_canonicalize_dynamic_reloc)
+    PARAMS ((bfd *, arelent **, struct symbol_cache_entry **));
 
  PTR backend_data;
 } bfd_target;
-bfd_target *
+const bfd_target *
 bfd_find_target PARAMS ((CONST char *target_name, bfd *abfd));
 
-CONST char **
+const char **
 bfd_target_list PARAMS ((void));
 
 boolean 
This page took 0.031643 seconds and 4 git commands to generate.