]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
PR ld/5398
authorNick Clifton <nickc@redhat.com>
Thu, 29 Nov 2007 08:17:54 +0000 (08:17 +0000)
committerNick Clifton <nickc@redhat.com>
Thu, 29 Nov 2007 08:17:54 +0000 (08:17 +0000)
* elf32-arm.c (bfd_elf32_arm_process_before_allocation): Do not complain if
   there is no glue bfd, just return.

bfd/ChangeLog
bfd/elf32-arm.c

index 8afce00a40067019470d55f826f920f99373adfa..dc188b52118b896816d9388271d04147b437d100 100644 (file)
@@ -1,3 +1,9 @@
+2007-11-29  Nick Clifton  <nickc@redhat.com>
+
+       PR ld/5398
+       * elf32-arm.c (bfd_elf32_arm_process_before_allocation): Do not
+       complain if there is no glue bfd, just return.
+
 2007-10-27  Daniel Jacobowitz  <dan@codesourcery.com>
 
        * elfxx-mips.c (mips_elf_sort_hash_table_f): Handle forced
index ef066d3a79e6f5bd7176bc866522fcad18d2166a..1a7bf02ab977bdc56bd6fd8d638fb92737d465bf 100644 (file)
@@ -3114,13 +3114,13 @@ bfd_elf32_arm_process_before_allocation (bfd *abfd,
   if (link_info->relocatable)
     return TRUE;
 
-  /* Here we have a bfd that is to be included on the link.  We have a hook
-     to do reloc rummaging, before section sizes are nailed down.  */
+  /* Here we have a bfd that is to be included on the link.  We have a
+     hook to do reloc rummaging, before section sizes are nailed down.  */
   globals = elf32_arm_hash_table (link_info);
-  check_use_blx (globals);
 
   BFD_ASSERT (globals != NULL);
-  BFD_ASSERT (globals->bfd_of_glue_owner != NULL);
+
+  check_use_blx (globals);
 
   if (globals->byteswap_code && !bfd_big_endian (abfd))
     {
@@ -3129,6 +3129,12 @@ bfd_elf32_arm_process_before_allocation (bfd *abfd,
       return FALSE;
     }
 
+  /* PR 5398: If we have not decided to include any loadable sections in
+     the output then we will not have a glue owner bfd.  This is OK, it
+     just means that there is nothing else for us to do here.  */
+  if (globals->bfd_of_glue_owner == NULL)
+    return TRUE;
+
   /* Rummage around all the relocs and map the glue vectors.  */
   sec = abfd->sections;