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.
This commit is contained in:
Alan Modra 2019-05-28 17:52:42 +09:30
parent 94667ab146
commit 0f4a61b420
2 changed files with 7 additions and 1 deletions

View File

@ -1,3 +1,9 @@
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

View 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. */