+Wed Jul 12 11:32:22 1995 Ian Lance Taylor <ian@cygnus.com>
+
+ * ldemul.h (ldemul_open_dynamic_archive): Add search parameter to
+ declaration.
+ (ld_emulation_xfer_type): Add search parameter to
+ open_dynamic_archive entry point.
+ * ldemul.c (ldemul_open_dynamic_archive): Add search parameter.
+ * ldfile.c (ldfile_try_open_bfd): Rename from try_open_bfd, and
+ make non-static. Change all callers to use new name.
+ (ldfile_open_file_search): Make static. If entry is dynamic, call
+ ldemul_open_dynamic_archive.
+ (ldfile_open_file): Don't call ldemul_open_dynamic_archive.
+ * ldfile.h (ldfile_open_file_search): Don't declare.
+ (ldfile_try_open_bfd): Declare.
+ * emultempl/elf32.em (gld${EMULATION_NAME}_open_dynamic_archive):
+ Accept search parameter. Don't search for a library, just look in
+ a single place.
+ * emultempl/linux.em (gld${EMULATION_NAME}_open_dynamic_archive):
+ Likewise.
+
+Tue Jul 11 16:44:21 1995 Ian Lance Taylor <ian@cygnus.com>
+
+ * ldmain.c (set_scripts_dir): Don't base script directory on
+ current directory.
+
Tue Jul 11 12:29:02 1995 Rick Sladkey <jrs@world.std.com>
* ldmisc.c (vfinfo): Don't print the line number if it isn't
#include "bfd.h"
#include "sysdep.h"
+#include "bfdlink.h"
#include "ld.h"
#include "ldmisc.h"
#include "ldexp.h"
static search_arch_type *search_arch_head;
static search_arch_type **search_arch_tail_ptr = &search_arch_head;
-static boolean try_open_bfd PARAMS ((const char *attempt,
- lang_input_statement_type *entry));
+static boolean ldfile_open_file_search
+ PARAMS ((const char *arch, lang_input_statement_type *,
+ const char *lib, const char *suffix));
static FILE *try_open PARAMS ((const char *name, const char *exten));
void
/* Try to open a BFD for a lang_input_statement. */
-static boolean
-try_open_bfd (attempt, entry)
+boolean
+ldfile_try_open_bfd (attempt, entry)
const char *attempt;
lang_input_statement_type *entry;
{
/* Search for and open the file specified by ENTRY. If it is an
archive, use ARCH, LIB and SUFFIX to modify the file name. */
-boolean
+static boolean
ldfile_open_file_search (arch, entry, lib, suffix)
const char *arch;
lang_input_statement_type *entry;
directory first. */
if (! entry->is_archive)
{
- if (try_open_bfd (entry->filename, entry))
+ if (ldfile_try_open_bfd (entry->filename, entry))
return true;
}
{
char *string;
+ if (entry->dynamic && ! link_info.relocateable)
+ {
+ if (ldemul_open_dynamic_archive (arch, search, entry))
+ return true;
+ }
+
string = (char *) xmalloc (strlen (search->name)
+ strlen (slash)
+ strlen (lib)
else
sprintf (string, "%s%s%s", search->name, slash, entry->filename);
- if (try_open_bfd (string, entry))
+ if (ldfile_try_open_bfd (string, entry))
{
entry->filename = string;
return true;
if (! entry->search_dirs_flag)
{
- if (try_open_bfd (entry->filename, entry))
+ if (ldfile_try_open_bfd (entry->filename, entry))
return;
}
else
arch != (search_arch_type *) NULL;
arch = arch->next)
{
- if (config.dynamic_link)
- {
- if (ldemul_open_dynamic_archive (arch->name, entry))
- return;
- }
if (ldfile_open_file_search (arch->name, entry, "lib", ".a"))
return;
#ifdef VMS