* ihex.c (ihex_set_arch_mach): Don't accept any architecture, just
authorIan Lance Taylor <ian@airs.com>
Thu, 14 Dec 1995 18:46:54 +0000 (18:46 +0000)
committerIan Lance Taylor <ian@airs.com>
Thu, 14 Dec 1995 18:46:54 +0000 (18:46 +0000)
a recognized one or bfd_arch_unknown.
(ihex_get_symtab_upper_bound): Define as bfd_0l, to permit objcopy
to succeed.
(ihex_get_symtab): Likewise.

bfd/ChangeLog
bfd/ihex.c

index 04e677d9833d99b9e17233e98caf3103160c05aa..13b4ca4637c250b02f2f530d2cc71afafbd6d6e3 100644 (file)
@@ -1,3 +1,11 @@
+Thu Dec 14 13:45:37 1995  Ian Lance Taylor  <ian@cygnus.com>
+
+       * ihex.c (ihex_set_arch_mach): Don't accept any architecture, just
+       a recognized one or bfd_arch_unknown.
+       (ihex_get_symtab_upper_bound): Define as bfd_0l, to permit objcopy
+       to succeed.
+       (ihex_get_symtab): Likewise.
+
 Wed Dec 13 15:44:06 1995  Ian Lance Taylor  <ian@cygnus.com>
 
        * aoutx.h: Include <ctype.h>.
index 512bf475979fae145eb35e92e2502b1467d058ef..a8c6e2ebe1443d4226cb85f1c2a1e77e3bbca4ba 100644 (file)
@@ -899,7 +899,11 @@ ihex_set_arch_mach (abfd, arch, mach)
      enum bfd_architecture arch;
      unsigned long mach;
 {
-  bfd_default_set_arch_mach (abfd, arch, mach);
+  if (! bfd_default_set_arch_mach (abfd, arch, mach))
+    {
+      if (arch != bfd_arch_unknown)
+       return false;
+    }
   return true;
 }
 
@@ -922,8 +926,9 @@ ihex_sizeof_headers (abfd, exec)
 #define ihex_get_section_contents_in_window \
   _bfd_generic_get_section_contents_in_window
 
-#define ihex_get_symtab_upper_bound _bfd_nosymbols_get_symtab_upper_bound
-#define ihex_get_symtab _bfd_nosymbols_get_symtab
+#define ihex_get_symtab_upper_bound bfd_0l
+#define ihex_get_symtab \
+  ((long (*) PARAMS ((bfd *, asymbol **))) bfd_0l)
 #define ihex_print_symbol _bfd_nosymbols_print_symbol
 #define ihex_get_symbol_info _bfd_nosymbols_get_symbol_info
 #define ihex_bfd_is_local_label _bfd_nosymbols_bfd_is_local_label