]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
(arm_elf_before_allocation): Replace ASSERT with a test for a NULL
authorNick Clifton <nickc@redhat.com>
Sat, 31 May 2003 09:46:35 +0000 (09:46 +0000)
committerNick Clifton <nickc@redhat.com>
Sat, 31 May 2003 09:46:35 +0000 (09:46 +0000)
bfd_for_interworking.

ld/ChangeLog
ld/emultempl/armelf.em

index 404d98f8893ac0c9fb2c358f9c6a7ca3b18a6618..b26f7f71a376a33354a3e8350fe83d4c8d3d175b 100644 (file)
@@ -1,3 +1,8 @@
+2003-05-30  Nick Clifton  <nickc@redhat.com>
+
+       * emultempl/armelf.em (arm_elf_before_allocation): Replace ASSERT
+       with a test for a NULL bfd_for_interworking.
+
 2003-05-05  Alan Modra  <amodra@bigpond.net.au>
 
        * ldlex.l: Accept C style comments in version scripts.
index 4a63e697e70c66a983cd76b4d94d8bfc8cabb6a0..b125c579effa98fd9c16798bfee94426c94ab23b 100644 (file)
@@ -108,11 +108,15 @@ arm_elf_before_allocation ()
        tem->output_has_begun = FALSE;
 
       lang_for_each_statement (arm_elf_set_bfd_for_interworking);
-      ASSERT (bfd_for_interwork != NULL);
       for (tem = link_info.input_bfds; tem != NULL; tem = tem->link_next)
        tem->output_has_begun = FALSE;
 
-      bfd_elf32_arm_get_bfd_for_interworking (bfd_for_interwork, &link_info);
+      /* If bfd_for_interwork is NULL, then there are no loadable sections
+        with real contents to be linked, so we are not going to have to
+        create any interworking stubs, so it is OK not to call
+        bfd_elf32_arm_get_bfd_for_interworking.  */
+      if (bfd_for_interwork != NULL)
+       bfd_elf32_arm_get_bfd_for_interworking (bfd_for_interwork, &link_info);
     }
   /* We should be able to set the size of the interworking stub section.  */