* "Dont" -> "Don't"
[deliverable/binutils-gdb.git] / binutils / rescoff.c
index e620f2eb20617d974961989659654c64e1bb77a5..45161c3677db09f4a31a0e94819545779e305b0e 100644 (file)
@@ -1,5 +1,5 @@
 /* rescoff.c -- read and write resources in Windows COFF files.
-   Copyright 1997 Free Software Foundation, Inc.
+   Copyright 1997, 1998, 2000 Free Software Foundation, Inc.
    Written by Ian Lance Taylor, Cygnus Support.
 
    This file is part of GNU Binutils.
@@ -142,9 +142,7 @@ read_coff_rsrc (filename, target)
   sec = bfd_get_section_by_name (abfd, ".rsrc");
   if (sec == NULL)
     {
-      fprintf (stderr, _("%s: %s: no resource section\n"), program_name,
-              filename);
-      xexit (1);
+      fatal (_("%s: no resource section"), filename);
     }
 
   size = bfd_section_size (abfd, sec);
@@ -447,9 +445,20 @@ write_coff_file (filename, target, resources)
   if (! bfd_set_format (abfd, bfd_object))
     bfd_fatal ("bfd_set_format");
 
+#if defined DLLTOOL_SH
+  if (! bfd_set_arch_mach (abfd, bfd_arch_sh, 0))
+    bfd_fatal ("bfd_set_arch_mach(sh)");
+#elif defined DLLTOOL_MIPS
+  if (! bfd_set_arch_mach (abfd, bfd_arch_mips, 0))
+    bfd_fatal ("bfd_set_arch_mach(mips)");
+#elif defined DLLTOOL_ARM
+  if (! bfd_set_arch_mach (abfd, bfd_arch_arm, 0))
+    bfd_fatal ("bfd_set_arch_mach(arm)");
+#else
   /* FIXME: This is obviously i386 specific.  */
   if (! bfd_set_arch_mach (abfd, bfd_arch_i386, 0))
-    bfd_fatal ("bfd_set_arch_mach");
+    bfd_fatal ("bfd_set_arch_mach(i386)");
+#endif
 
   if (! bfd_set_file_flags (abfd, HAS_SYMS | HAS_RELOC))
     bfd_fatal ("bfd_set_file_flags");
This page took 0.023792 seconds and 4 git commands to generate.