bfd/
[deliverable/binutils-gdb.git] / bfd / elf32-arm.c
index cbde697360b069c35c0d8c37d829204e39cd15a5..811d65185d8efdeb2f252ad16f21b2e9f6aeac57 100644 (file)
@@ -3116,13 +3116,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))
     {
@@ -3131,6 +3131,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;
 
@@ -8723,6 +8729,9 @@ elf32_arm_size_dynamic_sections (bfd * output_bfd ATTRIBUTE_UNUSED,
          if (!add_dynamic_entry (DT_TEXTREL, 0))
            return FALSE;
        }
+      if (htab->vxworks_p
+         && !elf_vxworks_add_dynamic_entries (output_bfd, info))
+       return FALSE;
     }
 #undef add_dynamic_entry
 
@@ -9065,6 +9074,9 @@ elf32_arm_finish_dynamic_sections (bfd * output_bfd, struct bfd_link_info * info
              unsigned int type;
 
            default:
+             if (htab->vxworks_p
+                 && elf_vxworks_finish_dynamic_entry (output_bfd, &dyn))
+               bfd_elf32_swap_dyn_out (output_bfd, &dyn, dyncon);
              break;
 
            case DT_HASH:
This page took 0.024944 seconds and 4 git commands to generate.