aboutsummaryrefslogtreecommitdiff
path: root/bfd
diff options
context:
space:
mode:
Diffstat (limited to 'bfd')
-rw-r--r--bfd/ChangeLog7
-rw-r--r--bfd/elflink.c1
2 files changed, 8 insertions, 0 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 99987a2..d40aa50 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,10 @@
+2021-02-04 Alan Modra <amodra@gmail.com>
+
+ PR 27311
+ * elflink.c (elf_link_add_object_symbols): Don't pull in as-needed
+ libraries for IR references on pass over libraries after LTO
+ recompilation.
+
2021-02-03 Alan Modra <amodra@gmail.com>
PR 27311
diff --git a/bfd/elflink.c b/bfd/elflink.c
index b8c2925..291cec0 100644
--- a/bfd/elflink.c
+++ b/bfd/elflink.c
@@ -5279,6 +5279,7 @@ elf_link_add_object_symbols (bfd *abfd, struct bfd_link_info *info)
&& h->ref_regular_nonweak)
|| (old_bfd != NULL
&& (old_bfd->flags & BFD_PLUGIN) != 0
+ && !info->lto_all_symbols_read
&& bind != STB_WEAK)
|| (h->ref_dynamic_nonweak
&& (elf_dyn_lib_class (abfd) & DYN_AS_NEEDED) != 0