summaryrefslogtreecommitdiff
path: root/ld/ldfile.c
diff options
context:
space:
mode:
Diffstat (limited to 'ld/ldfile.c')
-rw-r--r--ld/ldfile.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/ld/ldfile.c b/ld/ldfile.c
index 5cc3bef4bc0..f084d36a837 100644
--- a/ld/ldfile.c
+++ b/ld/ldfile.c
@@ -114,6 +114,16 @@ open_a(arch, entry, lib, suffix)
{
bfd*desc;
search_dirs_type *search ;
+
+ /* If this is not an archive, try to open it in the current
+ directory first. */
+ if (! entry->is_archive)
+ {
+ desc = cached_bfd_openr (entry->filename, entry);
+ if (desc != NULL)
+ return desc;
+ }
+
for (search = search_head;
search != (search_dirs_type *)NULL;
search = search->next)