Re: Another fix for EFI generation with LTO enabled

Revert 1c66b8a039 and instead fix the broken list pointer.

	PR 29998
	* pe-dll.c (build_filler_bfd): Revert last change.
	* ldlang.c (lang_process): When rescanning archives for lto,
	fix file_chain.tail pointer if the insert point happens to be
	at the end of the list.
This commit is contained in:
Alan Modra
2023-01-31 21:48:58 +10:30
parent 0fcf99b8ab
commit 081609f5ff
2 changed files with 2 additions and 16 deletions

View File

@@ -8017,6 +8017,8 @@ lang_process (void)
*insert = &files.head->input_statement;
files.head = (lang_statement_union_type *) *iter;
*iter = temp;
if (file_chain.tail == (lang_statement_union_type **) insert)
file_chain.tail = (lang_statement_union_type **) iter;
if (my_arch != NULL)
{
lang_input_statement_type *parent = bfd_usrdata (my_arch);