* targets.c (bfd_target): Make ar_max_namelen an unsigned char.
[deliverable/binutils-gdb.git] / bfd / binary.c
index ff7d1e09e05afd37f37a7735a9876022a4edf6df..ad93354016c04b11009c35fbdb8fcf8d4824db14 100644 (file)
@@ -1,6 +1,6 @@
 /* BFD back-end for binary objects.
    Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
-   2004, 2005, 2006, 2007, 2009 Free Software Foundation, Inc.
+   2004, 2005, 2006, 2007, 2009, 2011 Free Software Foundation, Inc.
    Written by Ian Lance Taylor, Cygnus Support, <ian@cygnus.com>
 
    This file is part of BFD, the Binary File Descriptor library.
    a start symbol, an end symbol, and an absolute length symbol.  */
 #define BIN_SYMS 3
 
-/* Set by external programs - specifies the BFD architecture and
-   machine number to be uses when creating binary BFDs.  */
-enum bfd_architecture  bfd_external_binary_architecture = bfd_arch_unknown;
-unsigned long          bfd_external_machine = 0;
-
 /* Create a binary object.  Invoked via bfd_set_format.  */
 
 static bfd_boolean
@@ -92,14 +87,6 @@ binary_object_p (bfd *abfd)
 
   abfd->tdata.any = (void *) sec;
 
-  if (bfd_get_arch_info (abfd) != NULL)
-    {
-      if ((bfd_get_arch_info (abfd)->arch == bfd_arch_unknown)
-          && (bfd_external_binary_architecture != bfd_arch_unknown))
-        bfd_set_arch_info (abfd, bfd_lookup_arch
-                          (bfd_external_binary_architecture, bfd_external_machine));
-    }
-
   return abfd->xvec;
 }
 
@@ -143,7 +130,7 @@ mangle_name (bfd *abfd, char *suffix)
          + strlen (suffix)
          + sizeof "_binary__");
 
-  buf = bfd_alloc (abfd, size);
+  buf = (char *) bfd_alloc (abfd, size);
   if (buf == NULL)
     return "";
 
@@ -167,7 +154,7 @@ binary_canonicalize_symtab (bfd *abfd, asymbol **alocation)
   unsigned int i;
   bfd_size_type amt = BIN_SYMS * sizeof (asymbol);
 
-  syms = bfd_alloc (abfd, amt);
+  syms = (asymbol *) bfd_alloc (abfd, amt);
   if (syms == NULL)
     return -1;
 
@@ -320,6 +307,8 @@ binary_sizeof_headers (bfd *abfd ATTRIBUTE_UNUSED,
 #define binary_bfd_link_hash_table_create         _bfd_generic_link_hash_table_create
 #define binary_bfd_link_hash_table_free           _bfd_generic_link_hash_table_free
 #define binary_bfd_link_just_syms                 _bfd_generic_link_just_syms
+#define binary_bfd_copy_link_hash_symbol_type \
+  _bfd_generic_copy_link_hash_symbol_type
 #define binary_bfd_link_add_symbols               _bfd_generic_link_add_symbols
 #define binary_bfd_final_link                     _bfd_generic_final_link
 #define binary_bfd_link_split_section             _bfd_generic_link_split_section
@@ -337,6 +326,7 @@ const bfd_target binary_vec =
   0,                           /* symbol_leading_char */
   ' ',                         /* ar_pad_char */
   16,                          /* ar_max_namelen */
+  255,                         /* match priority.  */
   bfd_getb64, bfd_getb_signed_64, bfd_putb64,
   bfd_getb32, bfd_getb_signed_32, bfd_putb32,
   bfd_getb16, bfd_getb_signed_16, bfd_putb16,  /* data */
This page took 0.026107 seconds and 4 git commands to generate.