2010-05-25 Tristan Gingold <gingold@adacore.com>
[deliverable/binutils-gdb.git] / bfd / coff-alpha.c
index 0d67264cf84b72371e725677577d634b62a267af..12b49ac1108af3e23947af2cb613620bf6b58065 100644 (file)
@@ -1,6 +1,7 @@
 /* BFD back-end for ALPHA Extended-Coff files.
    Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-   2003, 2004, 2005, 2007, 2008, 2009 Free Software Foundation, Inc.
+   2003, 2004, 2005, 2007, 2008, 2009, 2010
+   Free Software Foundation, Inc.
    Modified from coff-mips.c by Steve Chamberlain <sac@cygnus.com> and
    Ian Lance Taylor <ian@cygnus.com>.
 
@@ -2065,6 +2066,7 @@ alpha_adjust_headers (abfd, fhdr, ahdr)
   _bfd_ecoff_construct_extended_name_table
 #define alpha_ecoff_truncate_arname _bfd_ecoff_truncate_arname
 #define alpha_ecoff_write_armap _bfd_ecoff_write_armap
+#define alpha_ecoff_write_ar_hdr _bfd_generic_write_ar_hdr
 #define alpha_ecoff_generic_stat_arch_elt _bfd_ecoff_generic_stat_arch_elt
 #define alpha_ecoff_update_armap_timestamp _bfd_ecoff_update_armap_timestamp
 
@@ -2224,6 +2226,8 @@ alpha_ecoff_get_elt_at_filepos (archive, filepos)
 
   nbfd->flags |= BFD_IN_MEMORY;
   nbfd->iostream = (PTR) bim;
+  nbfd->iovec = &_bfd_memory_iovec;
+  nbfd->origin = 0;
   BFD_ASSERT (! nbfd->cacheable);
 
   return nbfd;
@@ -2262,7 +2266,7 @@ alpha_ecoff_openr_next_archived_file (archive, last_file)
       /* Pad to an even boundary...
         Note that last_file->origin can be odd in the case of
         BSD-4.4-style element with a long odd size.  */
-      filestart = last_file->origin + size;
+      filestart = last_file->proxy_origin + size;
       filestart += filestart % 2;
     }
 
@@ -2272,13 +2276,11 @@ alpha_ecoff_openr_next_archived_file (archive, last_file)
 /* Open the archive file given an index into the armap.  */
 
 static bfd *
-alpha_ecoff_get_elt_at_index (abfd, index)
-     bfd *abfd;
-     symindex index;
+alpha_ecoff_get_elt_at_index (bfd *abfd, symindex sym_index)
 {
   carsym *entry;
 
-  entry = bfd_ardata (abfd)->symdefs + index;
+  entry = bfd_ardata (abfd)->symdefs + sym_index;
   return alpha_ecoff_get_elt_at_filepos (abfd, entry->file_offset);
 }
 \f
This page took 0.024491 seconds and 4 git commands to generate.