diff options
Diffstat (limited to 'bfd/elflink.c')
-rw-r--r-- | bfd/elflink.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/bfd/elflink.c b/bfd/elflink.c index d20f357..c80ee82 100644 --- a/bfd/elflink.c +++ b/bfd/elflink.c @@ -3086,7 +3086,8 @@ static bfd_boolean on_needed_list (const char *soname, struct bfd_link_needed_list *needed) { for (; needed != NULL; needed = needed->next) - if (strcmp (soname, needed->name) == 0) + if ((elf_dyn_lib_class (needed->by) & DYN_AS_NEEDED) == 0 + && strcmp (soname, needed->name) == 0) return TRUE; return FALSE; |