]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blobdiff - bfd/elf32-frv.c
PR 30569, always call elf_backend_size_dynamic_sections
[thirdparty/binutils-gdb.git] / bfd / elf32-frv.c
index 5b66b074b9d515b24c95b6cecf4047618d45f396..718b7da8d68597480eb701ff3a000f0bfb76a2cf 100644 (file)
@@ -5423,15 +5423,16 @@ _frvfdpic_size_got_plt (bfd *output_bfd,
 /* Set the sizes of the dynamic sections.  */
 
 static bool
-elf32_frvfdpic_size_dynamic_sections (bfd *output_bfd,
-                                     struct bfd_link_info *info)
+elf32_frvfdpic_late_size_sections (bfd *output_bfd,
+                                  struct bfd_link_info *info)
 {
   bfd *dynobj;
   asection *s;
   struct _frvfdpic_dynamic_got_plt_info gpinfo;
 
   dynobj = elf_hash_table (info)->dynobj;
-  BFD_ASSERT (dynobj != NULL);
+  if (dynobj == NULL)
+    return true;
 
   if (elf_hash_table (info)->dynamic_sections_created)
     {
@@ -5472,8 +5473,8 @@ elf32_frvfdpic_size_dynamic_sections (bfd *output_bfd,
 }
 
 static bool
-elf32_frvfdpic_always_size_sections (bfd *output_bfd,
-                                    struct bfd_link_info *info)
+elf32_frvfdpic_early_size_sections (bfd *output_bfd,
+                                   struct bfd_link_info *info)
 {
   if (!bfd_link_relocatable (info)
       && !bfd_elf_stack_segment_size (output_bfd, info,
@@ -6817,9 +6818,9 @@ elf32_frv_grok_psinfo (bfd *abfd, Elf_Internal_Note *note)
 #undef bfd_elf32_bfd_link_hash_table_create
 #define bfd_elf32_bfd_link_hash_table_create \
                frvfdpic_elf_link_hash_table_create
-#undef elf_backend_always_size_sections
-#define elf_backend_always_size_sections \
-               elf32_frvfdpic_always_size_sections
+#undef elf_backend_early_size_sections
+#define elf_backend_early_size_sections \
+               elf32_frvfdpic_early_size_sections
 
 #undef elf_backend_create_dynamic_sections
 #define elf_backend_create_dynamic_sections \
@@ -6827,9 +6828,9 @@ elf32_frv_grok_psinfo (bfd *abfd, Elf_Internal_Note *note)
 #undef elf_backend_adjust_dynamic_symbol
 #define elf_backend_adjust_dynamic_symbol \
                elf32_frvfdpic_adjust_dynamic_symbol
-#undef elf_backend_size_dynamic_sections
-#define elf_backend_size_dynamic_sections \
-               elf32_frvfdpic_size_dynamic_sections
+#undef elf_backend_late_size_sections
+#define elf_backend_late_size_sections \
+               elf32_frvfdpic_late_size_sections
 #undef bfd_elf32_bfd_relax_section
 #define bfd_elf32_bfd_relax_section \
   elf32_frvfdpic_relax_section