* emultempl/mmo.em (mmo_after_open): Don't call
authorHans-Peter Nilsson <hp@axis.com>
Sun, 17 Feb 2002 21:38:03 +0000 (21:38 +0000)
committerHans-Peter Nilsson <hp@axis.com>
Sun, 17 Feb 2002 21:38:03 +0000 (21:38 +0000)
_bfd_mmix_check_all_relocs when producing ELF output.

ld/ChangeLog
ld/emultempl/mmo.em

index f56d8059da09ed8f5ee1ee5a7156b5fe1c292906..089f441eb3fd1482af86ee03bc7f20c633d0ccda 100644 (file)
@@ -1,3 +1,8 @@
+2002-02-17  Hans-Peter Nilsson  <hp@bitrange.com>
+
+       * emultempl/mmo.em (mmo_after_open): Don't call
+       _bfd_mmix_check_all_relocs when producing ELF output.
+
 2002-02-15  Richard Henderson  <rth@redhat.com>
 
         * emulparams/elf64alpha.sh (NOP): Adjust for big-endian
index 1a3941d3884e5209f4b09cefcb75437d40ff29fb..32be230122faf27d1136220a0baf5be5d65a1ed8 100644 (file)
@@ -238,12 +238,20 @@ mmo_finish ()
 static void
 mmo_after_open ()
 {
-  LANG_FOR_EACH_INPUT_STATEMENT (is)
+  /* When there's a mismatch between the output format and the emulation
+     (using weird combinations like "-m mmo --oformat elf64-mmix" for
+     example), we'd count relocs twice because they'd also be counted
+     along the usual route for ELF-only linking, which would lead to an
+     internal accounting error.  */
+  if (bfd_get_flavour (output_bfd) != bfd_target_elf_flavour)
     {
-      if (bfd_get_flavour (is->the_bfd) == bfd_target_elf_flavour
-         && !_bfd_mmix_check_all_relocs (is->the_bfd, &link_info))
-       einfo ("%X%P: Internal problems scanning %B after opening it",
-              is->the_bfd);
+      LANG_FOR_EACH_INPUT_STATEMENT (is)
+       {
+         if (bfd_get_flavour (is->the_bfd) == bfd_target_elf_flavour
+             && !_bfd_mmix_check_all_relocs (is->the_bfd, &link_info))
+           einfo ("%X%P: Internal problems scanning %B after opening it",
+                  is->the_bfd);
+       }
     }
 }
 EOF
This page took 0.02683 seconds and 4 git commands to generate.