diff options
Diffstat (limited to 'bfd/elflink.c')
-rw-r--r-- | bfd/elflink.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/bfd/elflink.c b/bfd/elflink.c index 1a45110..617c505 100644 --- a/bfd/elflink.c +++ b/bfd/elflink.c @@ -4480,10 +4480,13 @@ error_free_dyn: break; } + /* Don't add DT_NEEDED for references from the dummy bfd. */ if (!add_needed && definition && ((dynsym - && h->ref_regular) + && h->ref_regular + && (undef_bfd == NULL + || (undef_bfd->flags & BFD_PLUGIN) == 0)) || (h->ref_dynamic && (elf_dyn_lib_class (abfd) & DYN_AS_NEEDED) != 0 && !on_needed_list (elf_dt_name (abfd), htab->needed)))) |