COFF linker segmentation faults
authorAlan Modra <amodra@gmail.com>
Tue, 28 May 2019 08:22:42 +0000 (17:52 +0930)
committerAlan Modra <amodra@gmail.com>
Tue, 28 May 2019 08:27:51 +0000 (17:57 +0930)
A plugin can change the element, so call the generic
bfd_link_add_symbols.

PR 24596
* cofflink.c (coff_link_check_archive_element): Don't assume
element is a coff object file after calling add_archive_element.

bfd/ChangeLog
bfd/cofflink.c

index 464203f..09ba27a 100644 (file)
@@ -1,6 +1,12 @@
 2019-05-28  Alan Modra  <amodra@gmail.com>
 
        PR 24596
+       * cofflink.c (coff_link_check_archive_element): Don't assume
+       element is a coff object file after calling add_archive_element.
+
+2019-05-28  Alan Modra  <amodra@gmail.com>
+
+       PR 24596
        * elf32-microblaze.c (microblaze_elf_finish_dynamic_sections): Don't
        attempt to set sh_entsize for excluded PLT section.
 
index ac07d05..5e02760 100644 (file)
@@ -221,7 +221,7 @@ coff_link_check_archive_element (bfd *abfd,
     return TRUE;
   *pneeded = TRUE;
 
-  return coff_link_add_object_symbols (abfd, info);
+  return bfd_link_add_symbols (abfd, info);
 }
 
 /* Add all the symbols from an object file to the hash table.  */