diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2001-02-20 21:07:24 +0000 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2001-02-20 21:07:24 +0000 |
commit | 78f85fd7987835445807c27a617989df01341871 (patch) | |
tree | 5614359d142a5bed0ab5fd7cb4eca3b991ce8ff7 /ld/ldfile.c | |
parent | 60cf7a8541c6728bfbc94456e5934ef01f18cac0 (diff) | |
download | gdb-78f85fd7987835445807c27a617989df01341871.zip gdb-78f85fd7987835445807c27a617989df01341871.tar.gz gdb-78f85fd7987835445807c27a617989df01341871.tar.bz2 |
2001-02-20 H.J. Lu <hjl@gnu.org>
* ldfile.c (ldfile_open_file): Set entry->search_dirs_flag to
false if we found the file.
Diffstat (limited to 'ld/ldfile.c')
-rw-r--r-- | ld/ldfile.c | 23 |
1 files changed, 16 insertions, 7 deletions
diff --git a/ld/ldfile.c b/ld/ldfile.c index fbb4685..1456e3d 100644 --- a/ld/ldfile.c +++ b/ld/ldfile.c @@ -231,23 +231,32 @@ ldfile_open_file (entry) else { search_arch_type *arch; + boolean found = false; /* Try to open <filename><suffix> or lib<filename><suffix>.a */ for (arch = search_arch_head; arch != (search_arch_type *) NULL; arch = arch->next) { - if (ldfile_open_file_search (arch->name, entry, "lib", ".a")) - return; + found = ldfile_open_file_search (arch->name, entry, "lib", ".a"); + if (found) + break; #ifdef VMS - if (ldfile_open_file_search (arch->name, entry, ":lib", ".a")) - return; + found = ldfile_open_file_search (arch->name, entry, ":lib", ".a"); + if (found) + break; #endif - if (ldemul_find_potential_libraries (arch->name, entry)) - return; + found = ldemul_find_potential_libraries (arch->name, entry); + if (found) + break; } - einfo (_("%F%P: cannot find %s\n"), entry->local_sym_name); + /* If we have found the file, we don't need to search directories + again. */ + if (found) + entry->search_dirs_flag = false; + else + einfo (_("%F%P: cannot find %s\n"), entry->local_sym_name); } } |