daily update
[platform/upstream/binutils.git] / bfd / riscix.c
index 2e9416e..db04df1 100644 (file)
@@ -1,13 +1,13 @@
 /* BFD back-end for RISC iX (Acorn, arm) binaries.
    Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2004,
 /* BFD back-end for RISC iX (Acorn, arm) binaries.
    Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2004,
-   2005, 2007 Free Software Foundation, Inc.
+   2005, 2007, 2010, 2012 Free Software Foundation, Inc.
    Contributed by Richard Earnshaw (rwe@pegasus.esprit.ec.org)
 
    This file is part of BFD, the Binary File Descriptor library.
 
    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
    Contributed by Richard Earnshaw (rwe@pegasus.esprit.ec.org)
 
    This file is part of BFD, the Binary File Descriptor library.
 
    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,
    (at your option) any later version.
 
    This program is distributed in the hope that it will be useful,
@@ -17,7 +17,9 @@
 
    You should have received a copy of the GNU General Public License
    along with this program; if not, write to the Free Software
 
    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.  */
+
 
 /* RISC iX overloads the MAGIC field to indicate more than just the usual
    [ZNO]MAGIC values.  Also included are squeezing information and
 
 /* RISC iX overloads the MAGIC field to indicate more than just the usual
    [ZNO]MAGIC values.  Also included are squeezing information and
@@ -43,7 +45,7 @@
 /* A reference to a shared library.
    The text portion of the object contains "overflow text" from
    the shared library to be linked in with an object.  */
 /* A reference to a shared library.
    The text portion of the object contains "overflow text" from
    the shared library to be linked in with an object.  */
-#define SLOMAGIC        (MF_IS_SL | OMAGIC) 
+#define SLOMAGIC        (MF_IS_SL | OMAGIC)
 
 /* Sqeezed demand paged.
    NOTE: This interpretation of QMAGIC seems to be at variance
 
 /* Sqeezed demand paged.
    NOTE: This interpretation of QMAGIC seems to be at variance
@@ -205,7 +207,7 @@ riscix_fix_pcrel_26 (bfd *abfd,
   bfd_reloc_status_type flag = bfd_reloc_ok;
 
   /* If this is an undefined symbol, return error.  */
   bfd_reloc_status_type flag = bfd_reloc_ok;
 
   /* If this is an undefined symbol, return error.  */
-  if (symbol->section == &bfd_und_section
+  if (bfd_is_und_section (symbol->section)
       && (symbol->flags & BSF_WEAK) == 0)
     return output_bfd ? bfd_reloc_continue : bfd_reloc_undefined;
 
       && (symbol->flags & BSF_WEAK) == 0)
     return output_bfd ? bfd_reloc_continue : bfd_reloc_undefined;
 
@@ -252,7 +254,7 @@ riscix_reloc_type_lookup (bfd *abfd, bfd_reloc_code_real_type code)
 {
 #define ASTD(i,j)       case i: return &riscix_std_reloc_howto[j]
   if (code == BFD_RELOC_CTOR)
 {
 #define ASTD(i,j)       case i: return &riscix_std_reloc_howto[j]
   if (code == BFD_RELOC_CTOR)
-    switch (bfd_get_arch_info (abfd)->bits_per_address)
+    switch (bfd_arch_bits_per_address (abfd))
       {
       case 32:
         code = BFD_RELOC_32;
       {
       case 32:
         code = BFD_RELOC_32;
@@ -339,10 +341,10 @@ riscix_swap_std_reloc_out (bfd *abfd,
      check for that here.  */
 
   if (bfd_is_com_section (output_section)
      check for that here.  */
 
   if (bfd_is_com_section (output_section)
-      || output_section == & bfd_abs_section
-      || output_section == & bfd_und_section)
+      || bfd_is_abs_section (output_section)
+      || bfd_is_und_section (output_section))
     {
     {
-      if (bfd_abs_section.symbol == sym)
+      if (bfd_abs_section_ptr->symbol == sym)
        {
          /* Whoops, looked like an abs symbol, but is really an offset
             from the abs section.  */
        {
          /* Whoops, looked like an abs symbol, but is really an offset
             from the abs section.  */