aboutsummaryrefslogtreecommitdiff
path: root/ld/ldlang.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2023-01-31 21:48:58 +1030
committerAlan Modra <amodra@gmail.com>2023-01-31 21:51:09 +1030
commit081609f5ff3e7d469b9ea7621d924504c4e3c3b2 (patch)
tree8737b76b0de37aa19bb401cd009cc5261de0c8a6 /ld/ldlang.c
parent0fcf99b8ab5ccbde30fa7d36742e670cd4df48ef (diff)
downloadbinutils-081609f5ff3e7d469b9ea7621d924504c4e3c3b2.zip
binutils-081609f5ff3e7d469b9ea7621d924504c4e3c3b2.tar.gz
binutils-081609f5ff3e7d469b9ea7621d924504c4e3c3b2.tar.bz2
Re: Another fix for EFI generation with LTO enabled
Revert 1c66b8a03989 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.
Diffstat (limited to 'ld/ldlang.c')
-rw-r--r--ld/ldlang.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/ld/ldlang.c b/ld/ldlang.c
index b66d8c6..84a2914 100644
--- a/ld/ldlang.c
+++ b/ld/ldlang.c
@@ -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);