From 0f4a61b42002f568473f821f00dd240413beadd0 Mon Sep 17 00:00:00 2001 From: Alan Modra Date: Tue, 28 May 2019 17:52:42 +0930 Subject: [PATCH] COFF linker segmentation faults 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 | 6 ++++++ bfd/cofflink.c | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 464203fa629..09ba27afd44 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,9 @@ +2019-05-28 Alan Modra + + 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 PR 24596 diff --git a/bfd/cofflink.c b/bfd/cofflink.c index ac07d05e578..5e027601543 100644 --- a/bfd/cofflink.c +++ b/bfd/cofflink.c @@ -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. */ -- 2.30.2