Convert i960 COFF to use COFF backend linker.
[deliverable/binutils-gdb.git] / bfd / coff-mips.c
index d013bc192adb7d059d64f152a9163a8abdef8bd8..4b7fb32019c313aef811d3c14695713132e426e6 100644 (file)
@@ -542,7 +542,7 @@ mips_adjust_reloc_in (abfd, intern, rptr)
   /* If the type is MIPS_R_IGNORE, make sure this is a reference to
      the absolute section so that the reloc is ignored.  */
   if (intern->r_type == MIPS_R_IGNORE)
-    rptr->sym_ptr_ptr = bfd_abs_section.symbol_ptr_ptr;
+    rptr->sym_ptr_ptr = bfd_abs_section_ptr->symbol_ptr_ptr;
 
   /* If this is a MIPS_R_SWITCH reloc, or an internal MIPS_R_RELHI or
      MIPS_R_RELLO reloc, we want the addend field of the BFD relocto
@@ -657,7 +657,7 @@ mips_refhi_reloc (abfd,
     }
 
   ret = bfd_reloc_ok;
-  if (symbol->section == &bfd_und_section
+  if (bfd_is_und_section (symbol->section)
       && output_bfd == (bfd *) NULL)
     ret = bfd_reloc_undefined;
 
@@ -784,7 +784,7 @@ mips_gprel_reloc (abfd,
       output_bfd = symbol->section->output_section->owner;
     }
 
-  if (symbol->section == &bfd_und_section
+  if (bfd_is_und_section (symbol->section)
       && relocateable == false)
     return bfd_reloc_undefined;
 
@@ -925,7 +925,7 @@ mips_relhi_reloc (abfd,
     }
 
   ret = bfd_reloc_ok;
-  if (symbol->section == &bfd_und_section
+  if (bfd_is_und_section (symbol->section)
       && output_bfd == (bfd *) NULL)
     ret = bfd_reloc_undefined;
 
@@ -990,7 +990,7 @@ mips_rello_reloc (abfd,
         symbol is not defined we don't want to do this, because we
         don't want the value in the object file to incorporate the
         address of the reloc.  */
-      if (bfd_get_section (symbol) != &bfd_und_section
+      if (! bfd_is_und_section (bfd_get_section (symbol))
          && ! bfd_is_com_section (bfd_get_section (symbol)))
        val -= (input_section->output_section->vma
                + input_section->output_offset
@@ -2275,12 +2275,14 @@ static const struct ecoff_backend_data mips_ecoff_backend_data =
     (unsigned (*) PARAMS ((bfd *,PTR,PTR))) bfd_void, /* reloc_out */
     mips_ecoff_swap_filehdr_out, mips_ecoff_swap_aouthdr_out,
     mips_ecoff_swap_scnhdr_out,
-    FILHSZ, AOUTSZ, SCNHSZ, 0, 0, 0, true,
+    FILHSZ, AOUTSZ, SCNHSZ, 0, 0, 0, 0, true,
     mips_ecoff_swap_filehdr_in, mips_ecoff_swap_aouthdr_in,
-    mips_ecoff_swap_scnhdr_in, mips_ecoff_bad_format_hook,
-    ecoff_set_arch_mach_hook, ecoff_mkobject_hook,
-    ecoff_styp_to_sec_flags, ecoff_make_section_hook, ecoff_set_alignment_hook,
-    ecoff_slurp_symbol_table, NULL, NULL
+    mips_ecoff_swap_scnhdr_in, NULL,
+    mips_ecoff_bad_format_hook, _bfd_ecoff_set_arch_mach_hook,
+    _bfd_ecoff_mkobject_hook, _bfd_ecoff_styp_to_sec_flags,
+    _bfd_ecoff_make_section_hook, _bfd_ecoff_set_alignment_hook,
+    _bfd_ecoff_slurp_symbol_table,
+    NULL, NULL, NULL, NULL, NULL, NULL
   },
   /* Supported architecture.  */
   bfd_arch_mips,
@@ -2320,6 +2322,8 @@ static const struct ecoff_backend_data mips_ecoff_backend_data =
     ecoff_swap_fdr_in,
     ecoff_swap_rfd_in,
     ecoff_swap_ext_in,
+    _bfd_ecoff_swap_tir_in,
+    _bfd_ecoff_swap_rndx_in,
     /* Functions to swap out external symbolic data.  */
     ecoff_swap_hdr_out,
     ecoff_swap_dnr_out,
@@ -2328,7 +2332,11 @@ static const struct ecoff_backend_data mips_ecoff_backend_data =
     ecoff_swap_opt_out,
     ecoff_swap_fdr_out,
     ecoff_swap_rfd_out,
-    ecoff_swap_ext_out
+    ecoff_swap_ext_out,
+    _bfd_ecoff_swap_tir_out,
+    _bfd_ecoff_swap_rndx_out,
+    /* Function to read in symbolic data.  */
+    _bfd_ecoff_slurp_symbolic_info
   },
   /* External reloc size.  */
   RELSZ,
@@ -2343,16 +2351,16 @@ static const struct ecoff_backend_data mips_ecoff_backend_data =
 };
 
 /* Looking up a reloc type is MIPS specific.  */
-#define ecoff_bfd_reloc_type_lookup mips_bfd_reloc_type_lookup
+#define _bfd_ecoff_bfd_reloc_type_lookup mips_bfd_reloc_type_lookup
 
 /* Getting relocated section contents is generic.  */
-#define ecoff_bfd_get_relocated_section_contents \
+#define _bfd_ecoff_bfd_get_relocated_section_contents \
   bfd_generic_get_relocated_section_contents
 
 /* Relaxing sections is MIPS specific.  */
-#define ecoff_bfd_relax_section mips_relax_section
+#define _bfd_ecoff_bfd_relax_section mips_relax_section
 
-bfd_target ecoff_little_vec =
+const bfd_target ecoff_little_vec =
 {
   "ecoff-littlemips",          /* name */
   bfd_target_ecoff_flavour,
@@ -2377,26 +2385,26 @@ bfd_target ecoff_little_vec =
      bfd_getl16, bfd_getl_signed_16, bfd_putl16, /* hdrs */
 
   {_bfd_dummy_target, coff_object_p, /* bfd_check_format */
-     ecoff_archive_p, _bfd_dummy_target},
-  {bfd_false, ecoff_mkobject,  /* bfd_set_format */
+     _bfd_ecoff_archive_p, _bfd_dummy_target},
+  {bfd_false, _bfd_ecoff_mkobject,  /* bfd_set_format */
      _bfd_generic_mkarchive, bfd_false},
-  {bfd_false, ecoff_write_object_contents, /* bfd_write_contents */
+  {bfd_false, _bfd_ecoff_write_object_contents, /* bfd_write_contents */
      _bfd_write_archive_contents, bfd_false},
 
-     BFD_JUMP_TABLE_GENERIC (ecoff),
-     BFD_JUMP_TABLE_COPY (ecoff),
+     BFD_JUMP_TABLE_GENERIC (_bfd_ecoff),
+     BFD_JUMP_TABLE_COPY (_bfd_ecoff),
      BFD_JUMP_TABLE_CORE (_bfd_nocore),
-     BFD_JUMP_TABLE_ARCHIVE (ecoff),
-     BFD_JUMP_TABLE_SYMBOLS (ecoff),
-     BFD_JUMP_TABLE_RELOCS (ecoff),
-     BFD_JUMP_TABLE_WRITE (ecoff),
-     BFD_JUMP_TABLE_LINK (ecoff),
+     BFD_JUMP_TABLE_ARCHIVE (_bfd_ecoff),
+     BFD_JUMP_TABLE_SYMBOLS (_bfd_ecoff),
+     BFD_JUMP_TABLE_RELOCS (_bfd_ecoff),
+     BFD_JUMP_TABLE_WRITE (_bfd_ecoff),
+     BFD_JUMP_TABLE_LINK (_bfd_ecoff),
      BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic),
 
   (PTR) &mips_ecoff_backend_data
 };
 
-bfd_target ecoff_big_vec =
+const bfd_target ecoff_big_vec =
 {
   "ecoff-bigmips",             /* name */
   bfd_target_ecoff_flavour,
@@ -2419,20 +2427,20 @@ bfd_target ecoff_big_vec =
      bfd_getb32, bfd_getb_signed_32, bfd_putb32,
      bfd_getb16, bfd_getb_signed_16, bfd_putb16,
  {_bfd_dummy_target, coff_object_p, /* bfd_check_format */
-    ecoff_archive_p, _bfd_dummy_target},
- {bfd_false, ecoff_mkobject, /* bfd_set_format */
+    _bfd_ecoff_archive_p, _bfd_dummy_target},
+ {bfd_false, _bfd_ecoff_mkobject, /* bfd_set_format */
     _bfd_generic_mkarchive, bfd_false},
- {bfd_false, ecoff_write_object_contents, /* bfd_write_contents */
+ {bfd_false, _bfd_ecoff_write_object_contents, /* bfd_write_contents */
     _bfd_write_archive_contents, bfd_false},
 
-     BFD_JUMP_TABLE_GENERIC (ecoff),
-     BFD_JUMP_TABLE_COPY (ecoff),
+     BFD_JUMP_TABLE_GENERIC (_bfd_ecoff),
+     BFD_JUMP_TABLE_COPY (_bfd_ecoff),
      BFD_JUMP_TABLE_CORE (_bfd_nocore),
-     BFD_JUMP_TABLE_ARCHIVE (ecoff),
-     BFD_JUMP_TABLE_SYMBOLS (ecoff),
-     BFD_JUMP_TABLE_RELOCS (ecoff),
-     BFD_JUMP_TABLE_WRITE (ecoff),
-     BFD_JUMP_TABLE_LINK (ecoff),
+     BFD_JUMP_TABLE_ARCHIVE (_bfd_ecoff),
+     BFD_JUMP_TABLE_SYMBOLS (_bfd_ecoff),
+     BFD_JUMP_TABLE_RELOCS (_bfd_ecoff),
+     BFD_JUMP_TABLE_WRITE (_bfd_ecoff),
+     BFD_JUMP_TABLE_LINK (_bfd_ecoff),
      BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic),
 
   (PTR) &mips_ecoff_backend_data
This page took 0.027616 seconds and 4 git commands to generate.