* emultempl/armelf.em (arm_elf_after_open): Move check for using a
authorNick Clifton <nickc@redhat.com>
Wed, 22 Oct 2008 14:23:44 +0000 (14:23 +0000)
committerNick Clifton <nickc@redhat.com>
Wed, 22 Oct 2008 14:23:44 +0000 (14:23 +0000)
        non-arm output target from here...
        (arm_elf_create_output_section_statements): ... to here, so that
        the check is made at the earliest possible opportunity.

ld/ChangeLog
ld/emultempl/armelf.em

index ab15f1e2765e124538ff2be4c33ac06fc1ac517f..ab23982c8b7f51001ca29b5c1e16a0923db3d438 100644 (file)
@@ -1,3 +1,10 @@
+2008-10-22  Nick Clifton  <nickc@redhat.com>
+
+       * emultempl/armelf.em (arm_elf_after_open): Move check for using a
+       non-arm output target from here...
+       (arm_elf_create_output_section_statements): ... to here, so that
+       the check is made at the earliest possible opportunity.
+
 2008-10-22  Alan Modra  <amodra@bigpond.net.au>
 
        * emulparams/elf32_i960.sh (TEMPLATE_NAME): "generic", not "elf32".
index bb0e24c7e567c1cd7c579fd1fd1f1a7b9930822f..639410518ac81b32279061910bfdcac1d05fd209 100644 (file)
@@ -55,16 +55,6 @@ gld${EMULATION_NAME}_before_parse (void)
 static void
 arm_elf_after_open (void)
 {
-  if (strstr (bfd_get_target (link_info.output_bfd), "arm") == NULL)
-    {
-      /* The arm backend needs special fields in the output hash structure.
-        These will only be created if the output format is an arm format,
-        hence we do not support linking and changing output formats at the
-        same time.  Use a link followed by objcopy to change output formats.  */
-      einfo ("%F%X%P: error: cannot change output format whilst linking ARM binaries\n");
-      return;
-    }
-
   {
     LANG_FOR_EACH_INPUT_STATEMENT (is)
       {
@@ -439,6 +429,16 @@ gld${EMULATION_NAME}_finish (void)
 static void
 arm_elf_create_output_section_statements (void)
 {
+  if (strstr (bfd_get_target (link_info.output_bfd), "arm") == NULL)
+    {
+      /* The arm backend needs special fields in the output hash structure.
+        These will only be created if the output format is an arm format,
+        hence we do not support linking and changing output formats at the
+        same time.  Use a link followed by objcopy to change output formats.  */
+      einfo ("%F%X%P: error: Cannot change output format whilst linking ARM binaries.\n");
+      return;
+    }
+
   bfd_elf32_arm_set_target_relocs (link_info.output_bfd, &link_info,
                                   target1_is_rel,
                                   target2_type, fix_v4bx, use_blx,
This page took 0.030677 seconds and 4 git commands to generate.