Nios II R2 support for GDB.
[deliverable/binutils-gdb.git] / bfd / riscix.c
index 6ca26f6116cb6739b344e29ddda72d7ee723086f..9388c48aad39e841552d80c36ef89c101c1bd959 100644 (file)
@@ -1,6 +1,5 @@
 /* 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.
+   Copyright (C) 1994-2015 Free Software Foundation, Inc.
    Contributed by Richard Earnshaw (rwe@pegasus.esprit.ec.org)
 
    This file is part of BFD, the Binary File Descriptor library.
@@ -45,7 +44,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.  */
-#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
@@ -98,7 +97,7 @@
 /* Do not "beautify" the CONCAT* macro args.  Traditional C will not
    remove whitespace added here, and thus will fail to concatenate
    the tokens.  */
-#define MY(OP) CONCAT2 (riscix_,OP)
+#define MY(OP) CONCAT2 (arm_aout_riscix_,OP)
 #define TARGETNAME "a.out-riscix"
 #define N_BADMAG(x) ((((x).a_info & ~007200) != ZMAGIC) \
                   && (((x).a_info & ~006000) != OMAGIC) \
@@ -171,7 +170,7 @@ riscix_fix_pcrel_26_done (bfd *abfd ATTRIBUTE_UNUSED,
 }
 
 static bfd_reloc_status_type riscix_fix_pcrel_26 (bfd *, arelent *, asymbol *, void *, asection *, bfd *, char **);
-static const bfd_target *riscix_callback (bfd *);
+static const bfd_target *arm_aout_riscix_callback (bfd *);
 
 static reloc_howto_type riscix_std_reloc_howto[] =
 {
@@ -207,7 +206,7 @@ riscix_fix_pcrel_26 (bfd *abfd,
   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;
 
@@ -254,7 +253,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)
-    switch (bfd_get_arch_info (abfd)->bits_per_address)
+    switch (bfd_arch_bits_per_address (abfd))
       {
       case 32:
         code = BFD_RELOC_32;
@@ -298,9 +297,9 @@ riscix_reloc_name_lookup (bfd *abfd ATTRIBUTE_UNUSED,
 #define MY_bfd_final_link              _bfd_generic_final_link
 
 #define MY_bfd_reloc_type_lookup       riscix_reloc_type_lookup
-#define MY_bfd_reloc_name_lookup riscix_reloc_name_lookup
-#define MY_canonicalize_reloc          riscix_canonicalize_reloc
-#define MY_object_p                    riscix_object_p
+#define MY_bfd_reloc_name_lookup       riscix_reloc_name_lookup
+#define MY_canonicalize_reloc          arm_aout_riscix_canonicalize_reloc
+#define MY_object_p                    arm_aout_riscix_object_p
 
 static void
 riscix_swap_std_reloc_out (bfd *abfd,
@@ -341,10 +340,10 @@ riscix_swap_std_reloc_out (bfd *abfd,
      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.  */
This page took 0.026586 seconds and 4 git commands to generate.