Use the new architecture functions
authorSteve Chamberlain <steve@cygnus>
Tue, 1 Oct 1991 03:50:57 +0000 (03:50 +0000)
committerSteve Chamberlain <steve@cygnus>
Tue, 1 Oct 1991 03:50:57 +0000 (03:50 +0000)
binutils/copy.c
binutils/strip.c

index 7d4e4e375c39e7326820755eb8ccb9a4d73b89c6..3abe5a66df535f02766bbe731489a91d09f0c682 100644 (file)
@@ -104,11 +104,11 @@ bfd *obfd;
     }
 
     /* Copy architecture of input file to output file */
-    if (!bfd_set_arch_mach(obfd, bfd_get_architecture(ibfd),
-                          bfd_get_machine(ibfd))) {
+    if (!bfd_set_arch_mach(obfd, bfd_get_arch(ibfd),
+                          bfd_get_mach(ibfd))) {
        fprintf(stderr, "Output file cannot represent architecture %s\n",
-               bfd_printable_arch_mach(bfd_get_architecture(ibfd),
-                                       bfd_get_machine(ibfd)));
+               bfd_printable_arch_mach(bfd_get_arch(ibfd),
+                                       bfd_get_mach(ibfd)));
     }
     if (!bfd_set_format(obfd, bfd_get_format(ibfd)))
        {
@@ -357,6 +357,8 @@ main(argc, argv)
 
   program_name = argv[0];
 
+  bfd_init();
+
   if (strcmp(program_name,"strip") == 0) {
     strip = true;
   }
index cd0f3af45b71d78f49b695144ed1b518ee275d7b..6dd2eab6fdb077842c9702c6deb89b5398b52ee3 100755 (executable)
@@ -83,6 +83,8 @@ main (argc, argv)
   int c;
   program_name = argv[0];
        
+  bfd_init();
+
   strip_symbols = strip_undef; /* default is to strip everything.  */
   discard_locals = locals_undef;