summaryrefslogtreecommitdiff
path: root/ld/ldelf.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2023-04-19 14:21:15 +0930
committerAlan Modra <amodra@gmail.com>2023-04-20 09:03:53 +0930
commit2605f35cda6ec0710ad87e14912dd4ee537e674e (patch)
treef08fe08ae38e89a1597a7b38a60447fc710a4c2c /ld/ldelf.c
parent329dd2b6fcad4b3f1c4b0d443381f7c68ef18a9f (diff)
downloadbinutils-gdb-2605f35cda6ec0710ad87e14912dd4ee537e674e.tar.gz
PR30343 infrastructure
Make ldemul_before_plugin_all_symbols_read more useful. * ldlang.c (lang_process): Move call to ldemul_before_plugin_all_symbols_read outside BFD_SUPPORTS_PLUGINS. Allow backends to add to gc_sym_list before handling entry sym. * ldelf.c (ldelf_before_plugin_all_symbols_read): Test lto_plugin_active.
Diffstat (limited to 'ld/ldelf.c')
-rw-r--r--ld/ldelf.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/ld/ldelf.c b/ld/ldelf.c
index eff6693e052..f9a6819366f 100644
--- a/ld/ldelf.c
+++ b/ld/ldelf.c
@@ -1215,7 +1215,8 @@ ldelf_before_plugin_all_symbols_read (int use_libpath, int native,
{
struct elf_link_hash_table *htab = elf_hash_table (&link_info);
- if (!is_elf_hash_table (&htab->root))
+ if (!link_info.lto_plugin_active
+ || !is_elf_hash_table (&htab->root))
return;
htab->handling_dt_needed = true;