* Makefile.am: Rename .dep* files to DEP*. Change DEP variable to
[deliverable/binutils-gdb.git] / bfd / riscix.c
index 192ebff9a14dbaf73f645801934afd596bd4c5de..b3eb18cc5345f383b44948046589b1730c34f6b2 100644 (file)
@@ -1,5 +1,5 @@
 /* BFD back-end for RISC iX (Acorn, arm) binaries.
-   Copyright (C) 1994 Free Software Foundation, Inc.
+   Copyright (C) 1994, 95, 96, 97, 98, 1999 Free Software Foundation, Inc.
    Contributed by Richard Earnshaw (rwe@pegasus.esprit.ec.org)
    
 This file is part of BFD, the Binary File Descriptor library.
@@ -89,7 +89,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
 #include "bfd.h"
 #include "sysdep.h"
 #include "libbfd.h"
-#include "assert.h"
 
 #define WRITE_HEADERS(abfd, execp)                                        \
   {                                                                       \
@@ -155,7 +154,7 @@ static reloc_howto_type riscix_std_reloc_howto[] = {
   HOWTO( 5,              0,  1,   16, true,  0, complain_overflow_signed,  0,"DISP16",    true, 0x0000ffff,0x0000ffff, true),
   HOWTO( 6,              0,  2,   32, true,  0, complain_overflow_signed,  0,"DISP32",    true, 0xffffffff,0xffffffff, true),
   HOWTO( 7,              2,  3,   26, false, 0, complain_overflow_signed,  riscix_fix_pcrel_26_done, "ARM26D",true,0x00ffffff,0x00ffffff, false),
-  {-1},
+  EMPTY_HOWTO (-1),
   HOWTO( 9,              0, -1,   16, false, 0, complain_overflow_bitfield,0,"NEG16",        true, 0x0000ffff,0x0000ffff, false),
   HOWTO( 10,              0, -2,   32, false, 0, complain_overflow_bitfield,0,"NEG32",        true, 0xffffffff,0xffffffff, false)
 };
@@ -167,13 +166,13 @@ static reloc_howto_type riscix_std_reloc_howto[] = {
 static bfd_reloc_status_type
 riscix_fix_pcrel_26_done (abfd, reloc_entry, symbol, data, input_section,
                          output_bfd, error_message)
-     bfd *abfd;
-     arelent *reloc_entry;
-     asymbol *symbol;
-     PTR data;
-     asection *input_section;
-     bfd *output_bfd;
-     char **error_message;
+     bfd *abfd ATTRIBUTE_UNUSED;
+     arelent *reloc_entry ATTRIBUTE_UNUSED;
+     asymbol *symbol ATTRIBUTE_UNUSED;
+     PTR data ATTRIBUTE_UNUSED;
+     asection *input_section ATTRIBUTE_UNUSED;
+     bfd *output_bfd ATTRIBUTE_UNUSED;
+     char **error_message ATTRIBUTE_UNUSED;
 {
   /* This is dead simple at present.  */
   return bfd_reloc_ok;
@@ -188,7 +187,7 @@ riscix_fix_pcrel_26 (abfd, reloc_entry, symbol, data, input_section,
      PTR data;
      asection *input_section;
      bfd *output_bfd;
-     char **error_message;
+     char **error_message ATTRIBUTE_UNUSED;
 {
   bfd_vma relocation;
   bfd_size_type addr = reloc_entry->address;
@@ -221,7 +220,7 @@ riscix_fix_pcrel_26 (abfd, reloc_entry, symbol, data, input_section,
   /* Check for overflow */
   if (relocation & 0x02000000)
     {
-      if ((relocation & ~0x03ffffff) != ~0x03ffffff)
+      if ((relocation & ~ (bfd_vma) 0x03ffffff) != ~ (bfd_vma) 0x03ffffff)
        flag = bfd_reloc_overflow;
     }
   else if (relocation & ~0x03ffffff)
@@ -267,6 +266,7 @@ DEFUN(riscix_reloc_type_lookup,(abfd,code),
 
 #define MY_bfd_link_hash_table_create _bfd_generic_link_hash_table_create
 #define MY_bfd_link_add_symbols _bfd_generic_link_add_symbols
+#define MY_final_link_callback should_not_be_used
 #define MY_bfd_final_link _bfd_generic_final_link
 
 #define MY_bfd_reloc_type_lookup riscix_reloc_type_lookup
@@ -338,7 +338,7 @@ riscix_swap_std_reloc_out (abfd, g, natptr)
        {
          /* Fill in symbol */
          r_extern = 1;
-         r_index =  stoi((*(g->sym_ptr_ptr))->flags);
+         r_index = (*g->sym_ptr_ptr)->udata.i;
        }
     }
   else
@@ -453,7 +453,7 @@ MY(canonicalize_reloc)(abfd, section, relptr, symbols)
   for (count = 0; count++ < section->reloc_count;)
     {
       c = tblptr->howto - NAME(aout,std_howto_table);
-      assert (c < RISCIX_TABLE_SIZE);
+      BFD_ASSERT (c < RISCIX_TABLE_SIZE);
       tblptr->howto = &riscix_std_reloc_howto[c];
 
       *relptr++ = tblptr++;
@@ -496,7 +496,7 @@ riscix_some_aout_object_p (abfd, execp, callback_to_real_object_p)
   execp = abfd->tdata.aout_data->a.hdr;
 
   /* Set the file flags */
-  abfd->flags = NO_FLAGS;
+  abfd->flags = BFD_NO_FLAGS;
   if (execp->a_drsize || execp->a_trsize)
     abfd->flags |= HAS_RELOC;
   /* Setting of EXEC_P has been deferred to the bottom of this function */
This page took 0.025934 seconds and 4 git commands to generate.