2010-01-26 Tristan Gingold <gingold@adacore.com>
[deliverable/binutils-gdb.git] / bfd / libbfd.h
index 0a1cdb15c5ba907e98d0e813b42de83e4b1598d5..2be8fe50d062874cb4993d12aeb3a8eb61920a89 100644 (file)
@@ -7,7 +7,7 @@
    (This include file is not for users of the library.)
 
    Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
-   1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007
+   1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
    Free Software Foundation, Inc.
 
    Written by Cygnus Support.
@@ -95,6 +95,7 @@ struct artdata {
 struct areltdata {
   char * arch_header;          /* it's actually a string */
   unsigned int parsed_size;    /* octets of filesize not including ar_hdr */
+  unsigned int extra_size;     /* BSD4.4: extra bytes after the header.  */
   char *filename;              /* null-terminated */
   file_ptr origin;             /* for element of a thin archive */
 };
@@ -212,6 +213,12 @@ extern void _bfd_ar_spacepad
 extern void *_bfd_generic_read_ar_hdr_mag
   (bfd *, const char *);
 
+extern bfd_boolean _bfd_generic_write_ar_hdr
+  (bfd *, bfd *);
+
+extern bfd_boolean _bfd_bsd44_write_ar_hdr
+  (bfd *, bfd *);
+
 bfd * bfd_generic_openr_next_archived_file
   (bfd *archive, bfd *last_file);
 
@@ -220,6 +227,8 @@ int bfd_generic_stat_arch_elt
 
 #define _bfd_read_ar_hdr(abfd) \
   BFD_SEND (abfd, _bfd_read_ar_hdr_fn, (abfd))
+#define _bfd_write_ar_hdr(archive, abfd)         \
+  BFD_SEND (abfd, _bfd_write_ar_hdr_fn, (archive, abfd))
 \f
 /* Generic routines to use for BFD_JUMP_TABLE_GENERIC.  Use
    BFD_JUMP_TABLE_GENERIC (_bfd_generic).  */
@@ -278,6 +287,8 @@ extern bfd_boolean _bfd_nocore_core_file_matches_executable_p
   ((bfd_boolean (*) (bfd *, unsigned int, struct orl *, unsigned int, int)) \
    bfd_false)
 #define _bfd_noarchive_read_ar_hdr bfd_nullvoidptr
+#define _bfd_noarchive_write_ar_hdr \
+  ((bfd_boolean (*) (bfd *, bfd *)) bfd_false)
 #define _bfd_noarchive_openr_next_archived_file \
   ((bfd *(*) (bfd *, bfd *)) bfd_nullvoidptr)
 #define _bfd_noarchive_get_elt_at_index \
@@ -296,6 +307,7 @@ extern bfd_boolean _bfd_archive_bsd_construct_extended_name_table
 #define _bfd_archive_bsd_truncate_arname bfd_bsd_truncate_arname
 #define _bfd_archive_bsd_write_armap bsd_write_armap
 #define _bfd_archive_bsd_read_ar_hdr _bfd_generic_read_ar_hdr
+#define _bfd_archive_bsd_write_ar_hdr _bfd_generic_write_ar_hdr
 #define _bfd_archive_bsd_openr_next_archived_file \
   bfd_generic_openr_next_archived_file
 #define _bfd_archive_bsd_get_elt_at_index _bfd_generic_get_elt_at_index
@@ -315,6 +327,7 @@ extern bfd_boolean _bfd_archive_coff_construct_extended_name_table
 #define _bfd_archive_coff_truncate_arname bfd_dont_truncate_arname
 #define _bfd_archive_coff_write_armap coff_write_armap
 #define _bfd_archive_coff_read_ar_hdr _bfd_generic_read_ar_hdr
+#define _bfd_archive_coff_write_ar_hdr _bfd_generic_write_ar_hdr
 #define _bfd_archive_coff_openr_next_archived_file \
   bfd_generic_openr_next_archived_file
 #define _bfd_archive_coff_get_elt_at_index _bfd_generic_get_elt_at_index
@@ -322,6 +335,26 @@ extern bfd_boolean _bfd_archive_coff_construct_extended_name_table
   bfd_generic_stat_arch_elt
 #define _bfd_archive_coff_update_armap_timestamp bfd_true
 
+/* Routines to use for BFD_JUMP_TABLE_ARCHIVE to get BSD4.4 style
+   archives.  Use BFD_JUMP_TABLE_ARCHIVE (_bfd_archive_bsd44).  */
+
+#define _bfd_archive_bsd44_slurp_armap bfd_slurp_bsd_armap
+#define _bfd_archive_bsd44_slurp_extended_name_table \
+  _bfd_slurp_extended_name_table
+extern bfd_boolean _bfd_archive_bsd44_construct_extended_name_table
+  (bfd *, char **, bfd_size_type *, const char **);
+#define _bfd_archive_bsd44_truncate_arname bfd_bsd_truncate_arname
+#define _bfd_archive_bsd44_write_armap bsd_write_armap
+#define _bfd_archive_bsd44_read_ar_hdr _bfd_generic_read_ar_hdr
+#define _bfd_archive_bsd44_write_ar_hdr _bfd_bsd44_write_ar_hdr
+#define _bfd_archive_bsd44_openr_next_archived_file \
+  bfd_generic_openr_next_archived_file
+#define _bfd_archive_bsd44_get_elt_at_index _bfd_generic_get_elt_at_index
+#define _bfd_archive_bsd44_generic_stat_arch_elt \
+  bfd_generic_stat_arch_elt
+#define _bfd_archive_bsd44_update_armap_timestamp \
+  _bfd_archive_bsd_update_armap_timestamp
+
 /* Routines to use for BFD_JUMP_TABLE_SYMBOLS where there is no symbol
    support.  Use BFD_JUMP_TABLE_SYMBOLS (_bfd_nosymbols).  */
 
@@ -415,6 +448,9 @@ extern bfd_boolean _bfd_generic_set_section_contents
   ((bfd_boolean (*) (bfd *, struct bfd_link_info *)) bfd_false)
 #define _bfd_nolink_bfd_link_just_syms \
   ((void (*) (asection *, struct bfd_link_info *)) bfd_void)
+#define _bfd_nolink_bfd_copy_link_hash_symbol_type \
+  ((void (*) (bfd *, struct bfd_link_hash_entry *, \
+             struct bfd_link_hash_entry *)) bfd_void)
 #define _bfd_nolink_bfd_final_link \
   ((bfd_boolean (*) (bfd *, struct bfd_link_info *)) bfd_false)
 #define _bfd_nolink_bfd_link_split_section \
@@ -529,6 +565,10 @@ extern bfd_boolean _bfd_generic_link_add_one_symbol
 extern void _bfd_generic_link_just_syms
   (asection *, struct bfd_link_info *);
 
+/* Generic routine that does nothing.  */
+extern void _bfd_generic_copy_link_hash_symbol_type
+  (bfd *, struct bfd_link_hash_entry *, struct bfd_link_hash_entry *);
+
 /* Generic link routine.  */
 extern bfd_boolean _bfd_generic_final_link
   (bfd *, struct bfd_link_info *);
@@ -1646,6 +1686,30 @@ static const char *const bfd_reloc_code_real_names[] = { "@@uninitialized@@",
   "BFD_RELOC_AVR_LDI",
   "BFD_RELOC_AVR_6",
   "BFD_RELOC_AVR_6_ADIW",
+  "BFD_RELOC_RX_NEG8",
+  "BFD_RELOC_RX_NEG16",
+  "BFD_RELOC_RX_NEG24",
+  "BFD_RELOC_RX_NEG32",
+  "BFD_RELOC_RX_16_OP",
+  "BFD_RELOC_RX_24_OP",
+  "BFD_RELOC_RX_32_OP",
+  "BFD_RELOC_RX_8U",
+  "BFD_RELOC_RX_16U",
+  "BFD_RELOC_RX_24U",
+  "BFD_RELOC_RX_DIR3U_PCREL",
+  "BFD_RELOC_RX_DIFF",
+  "BFD_RELOC_RX_GPRELB",
+  "BFD_RELOC_RX_GPRELW",
+  "BFD_RELOC_RX_GPRELL",
+  "BFD_RELOC_RX_SYM",
+  "BFD_RELOC_RX_OP_SUBTRACT",
+  "BFD_RELOC_RX_ABS8",
+  "BFD_RELOC_RX_ABS16",
+  "BFD_RELOC_RX_ABS32",
+  "BFD_RELOC_RX_ABS16U",
+  "BFD_RELOC_RX_ABS16UW",
+  "BFD_RELOC_RX_ABS16UL",
+  "BFD_RELOC_RX_RELAX",
   "BFD_RELOC_390_12",
   "BFD_RELOC_390_GOT12",
   "BFD_RELOC_390_PLT32",
@@ -2072,6 +2136,15 @@ static const char *const bfd_reloc_code_real_names[] = { "@@uninitialized@@",
   "BFD_RELOC_LM32_RELATIVE",
   "BFD_RELOC_MACH_O_SECTDIFF",
   "BFD_RELOC_MACH_O_PAIR",
+  "BFD_RELOC_MACH_O_X86_64_BRANCH32",
+  "BFD_RELOC_MACH_O_X86_64_BRANCH8",
+  "BFD_RELOC_MACH_O_X86_64_GOT",
+  "BFD_RELOC_MACH_O_X86_64_GOT_LOAD",
+  "BFD_RELOC_MACH_O_X86_64_SUBTRACTOR32",
+  "BFD_RELOC_MACH_O_X86_64_SUBTRACTOR64",
+  "BFD_RELOC_MACH_O_X86_64_PCREL32_1",
+  "BFD_RELOC_MACH_O_X86_64_PCREL32_2",
+  "BFD_RELOC_MACH_O_X86_64_PCREL32_4",
   "BFD_RELOC_MICROBLAZE_32_LO",
   "BFD_RELOC_MICROBLAZE_32_LO_PCREL",
   "BFD_RELOC_MICROBLAZE_32_ROSDA",
This page took 0.029329 seconds and 4 git commands to generate.