FIX EOF detection in PT_IO-based to_xfer_partial implementation.
[deliverable/binutils-gdb.git] / bfd / versados.c
index a2ce0db79ae4f25ef84a361dda6182ceef0b9acc..ae6f671392bc16bd62b057fd1ccab1ab2c9030dd 100644 (file)
@@ -1,6 +1,6 @@
 /* BFD back-end for VERSAdos-E objects.
    Copyright 1995, 1996, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
-   2006, 2007 Free Software Foundation, Inc.
+   2006, 2007, 2009, 2010, 2011, 2012 Free Software Foundation, Inc.
    Written by Steve Chamberlain of Cygnus Support <sac@cygnus.com>.
 
    Versados is a Motorola trademark.
@@ -9,7 +9,7 @@
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 2 of the License, or
+   the Free Software Foundation; either version 3 of the License, or
    (at your option) any later version.
 
    This program is distributed in the hope that it will be useful,
@@ -19,7 +19,8 @@
 
    You should have received a copy of the GNU General Public License
    along with this program; if not, write to the Free Software
-   Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.  */
+   Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
+   MA 02110-1301, USA.  */
 
 /*
    SUBSECTION
@@ -276,7 +277,9 @@ process_esd (bfd *abfd, struct ext_esd *esd, int pass)
 
        case ESD_ABS:
          size = get_4 (&ptr);
+         (void) size;
          start = get_4 (&ptr);
+         (void) start;
          break;
        case ESD_STD_REL_SEC:
        case ESD_SHRT_REL_SEC:
@@ -284,7 +287,7 @@ process_esd (bfd *abfd, struct ext_esd *esd, int pass)
          sec->flags |= SEC_ALLOC;
          break;
        case ESD_XDEF_IN_ABS:
-         sec = (asection *) & bfd_abs_section;
+         sec = bfd_abs_section_ptr;
        case ESD_XDEF_IN_SEC:
          {
            int snum = VDATA (abfd)->def_idx++;
@@ -398,9 +401,9 @@ process_otr (bfd *abfd, struct ext_otr *otr, int pass)
 
              for (j = 0; j < esdids; j++)
                {
-                 int esdid = *srcp++;
+                 int id = *srcp++;
 
-                 if (esdid)
+                 if (id)
                    {
                      int rn = EDATA (abfd, otr->esdid - 1).relocs++;
 
@@ -415,7 +418,7 @@ process_otr (bfd *abfd, struct ext_otr *otr, int pass)
                          EDATA (abfd, otr->esdid - 1).section->relocation + rn;
                          n->address = dst_idx;
 
-                         n->sym_ptr_ptr = (asymbol **) (size_t) esdid;
+                         n->sym_ptr_ptr = (asymbol **) (size_t) id;
                          n->addend = 0;
                          n->howto = versados_howto_table + ((j & 1) * 2) + (sizeinwords - 1);
                        }
@@ -765,7 +768,7 @@ versados_canonicalize_reloc (bfd *abfd,
          int esdid = (int) (size_t) src[count].sym_ptr_ptr;
 
          if (esdid == 0)
-           src[count].sym_ptr_ptr = bfd_abs_section.symbol_ptr_ptr;
+           src[count].sym_ptr_ptr = bfd_abs_section_ptr->symbol_ptr_ptr;
          else if (esdid < ES_BASE)
            {
              /* Section relative thing.  */
@@ -803,14 +806,18 @@ versados_canonicalize_reloc (bfd *abfd,
 #define versados_bfd_get_relocated_section_contents   bfd_generic_get_relocated_section_contents
 #define versados_bfd_relax_section                    bfd_generic_relax_section
 #define versados_bfd_gc_sections                      bfd_generic_gc_sections
+#define versados_bfd_lookup_section_flags             bfd_generic_lookup_section_flags
 #define versados_bfd_merge_sections                   bfd_generic_merge_sections
 #define versados_bfd_is_group_section                 bfd_generic_is_group_section
 #define versados_bfd_discard_group                    bfd_generic_discard_group
 #define versados_section_already_linked               _bfd_generic_section_already_linked
+#define versados_bfd_define_common_symbol             bfd_generic_define_common_symbol
 #define versados_bfd_link_hash_table_create           _bfd_generic_link_hash_table_create
 #define versados_bfd_link_hash_table_free             _bfd_generic_link_hash_table_free
 #define versados_bfd_link_add_symbols                 _bfd_generic_link_add_symbols
 #define versados_bfd_link_just_syms                   _bfd_generic_link_just_syms
+#define versados_bfd_copy_link_hash_symbol_type \
+  _bfd_generic_copy_link_hash_symbol_type
 #define versados_bfd_final_link                       _bfd_generic_final_link
 #define versados_bfd_link_split_section               _bfd_generic_link_split_section
 
@@ -828,6 +835,7 @@ const bfd_target versados_vec =
   0,                           /* Leading underscore.  */
   ' ',                         /* AR_pad_char.  */
   16,                          /* AR_max_namelen.  */
+  0,                           /* 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.042517 seconds and 4 git commands to generate.