* README: Fix a typo.
[deliverable/binutils-gdb.git] / bfd / coff-m68k.c
index 8adaf7fc0751e4b8beb42cac1d5f15fe24a87298..397d98378d77315a67349f8efccaf68abb68485d 100644 (file)
@@ -68,18 +68,6 @@ static reloc_howto_type *m68kcoff_common_addend_rtype_to_howto
 #endif
 
 static boolean m68k_coff_is_local_label_name PARAMS ((bfd *, const char *));
-#ifdef STATIC_RELOCS
-static
-#endif
-reloc_howto_type * m68k_reloc_type_lookup PARAMS ((bfd *, bfd_reloc_code_real_type));
-#ifdef STATIC_RELOCS
-static
-#endif
-int m68k_howto2rtype PARAMS ((reloc_howto_type *));
-#ifdef STATIC_RELOCS
-static
-#endif
-void m68k_rtype2howto PARAMS ((arelent *, int));
 
 /* On the delta, a symbol starting with L% is local.  We won't see
    such a symbol on other platforms, so it should be safe to always
@@ -135,10 +123,19 @@ extern int m68k_howto2rtype PARAMS ((reloc_howto_type *));
 extern reloc_howto_type *m68k_reloc_type_lookup
   PARAMS ((bfd *, bfd_reloc_code_real_type));
 #else
+
 #ifdef STATIC_RELOCS
-static
+#define STAT_REL static
+#else
+#define STAT_REL
 #endif
-void
+
+STAT_REL reloc_howto_type * m68k_reloc_type_lookup PARAMS ((bfd *, bfd_reloc_code_real_type));
+STAT_REL int m68k_howto2rtype PARAMS ((reloc_howto_type *));
+STAT_REL void m68k_rtype2howto PARAMS ((arelent *, int));
+
+
+STAT_REL void
 m68k_rtype2howto(internal, relocentry)
      arelent *internal;
      int relocentry;
@@ -155,10 +152,7 @@ m68k_rtype2howto(internal, relocentry)
     }
 }
 
-#ifdef STATIC_RELOCS
-static
-#endif
-int
+STAT_REL int
 m68k_howto2rtype (internal)
      reloc_howto_type *internal;
 {
@@ -183,10 +177,7 @@ m68k_howto2rtype (internal)
   return R_RELLONG;
 }
 
-#ifdef STATIC_RELOCS
-static
-#endif
-reloc_howto_type *
+STAT_REL reloc_howto_type *
 m68k_reloc_type_lookup (abfd, code)
      bfd *abfd ATTRIBUTE_UNUSED;
      bfd_reloc_code_real_type code;
@@ -325,7 +316,7 @@ m68kcoff_common_addend_special_fn (abfd, reloc_entry, symbol, data,
          {
            short x = bfd_get_16 (abfd, addr);
            DOIT (x);
-           bfd_put_16 (abfd, x, addr);
+           bfd_put_16 (abfd, (bfd_vma) x, addr);
          }
          break;
 
@@ -333,7 +324,7 @@ m68kcoff_common_addend_special_fn (abfd, reloc_entry, symbol, data,
          {
            long x = bfd_get_32 (abfd, addr);
            DOIT (x);
-           bfd_put_32 (abfd, x, addr);
+           bfd_put_32 (abfd, (bfd_vma) x, addr);
          }
          break;
 
@@ -451,6 +442,7 @@ bfd_m68k_coff_create_embedded_relocs (abfd, info, datasec, relsec, errmsg)
   bfd_size_type symesz;
   struct internal_reloc *irel, *irelend;
   bfd_byte *p;
+  bfd_size_type amt;
 
   BFD_ASSERT (! info->relocateable);
 
@@ -466,7 +458,8 @@ bfd_m68k_coff_create_embedded_relocs (abfd, info, datasec, relsec, errmsg)
                                         NULL);
   irelend = irel + datasec->reloc_count;
 
-  relsec->contents = (bfd_byte *) bfd_alloc (abfd, datasec->reloc_count * 12);
+  amt = (bfd_size_type) datasec->reloc_count * 12;
+  relsec->contents = (bfd_byte *) bfd_alloc (abfd, amt);
   if (relsec->contents == NULL)
     return false;
 
This page took 0.023681 seconds and 4 git commands to generate.