From: Ian Lance Taylor Date: Mon, 13 Jun 1994 21:35:27 +0000 (+0000) Subject: * ldfile.c (open_a): If this is not an archive, try to open it in X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=e845d289943d2098356fad5da1a08ef1f41092b3;p=binutils-gdb.git * ldfile.c (open_a): If this is not an archive, try to open it in the current directory before searching for it. --- diff --git a/ld/ChangeLog b/ld/ChangeLog index 6fd67f4783f..96fde760ea6 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -1,5 +1,8 @@ Mon Jun 13 15:46:09 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com) + * ldfile.c (open_a): If this is not an archive, try to open it in + the current directory before searching for it. + * lexsup.c (parse_args): Treat -i as a synonym for -r. * ldgram.y (exp): Treat BLOCK as a synonym for ALIGN, so that 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)