diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2009-04-14 02:47:22 +0000 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2009-04-14 02:47:22 +0000 |
commit | 8c3e16f4a7a82ec2fafd3a9cdede174e99780ac8 (patch) | |
tree | 0a41b0742217d03fbd815ff42fe897b3b572ee58 | |
parent | 5171a1d11062ccd21eeb7c8e5f9df99895f3a11d (diff) | |
download | gdb-8c3e16f4a7a82ec2fafd3a9cdede174e99780ac8.zip gdb-8c3e16f4a7a82ec2fafd3a9cdede174e99780ac8.tar.gz gdb-8c3e16f4a7a82ec2fafd3a9cdede174e99780ac8.tar.bz2 |
2009-04-13 H.J. Lu <hongjiu.lu@intel.com>
* ldfile.c (ldfile_find_command_file): Revert the last change.
-rw-r--r-- | ld/ChangeLog | 4 | ||||
-rw-r--r-- | ld/ldfile.c | 19 |
2 files changed, 15 insertions, 8 deletions
diff --git a/ld/ChangeLog b/ld/ChangeLog index 6e59319..58144b6 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -1,3 +1,7 @@ +2009-04-13 H.J. Lu <hongjiu.lu@intel.com> + + * ldfile.c (ldfile_find_command_file): Revert the last change. + 2009-04-11 H.J. Lu <hongjiu.lu@intel.com> PR ld/10047 diff --git a/ld/ldfile.c b/ld/ldfile.c index 2aff713..422416a 100644 --- a/ld/ldfile.c +++ b/ld/ldfile.c @@ -542,10 +542,10 @@ find_scripts_dir (void) return NULL; } -/* Try to open NAME; if that fails, look for it in directories specified - with -L, then in the default script directory, without and with EXTEND - appended. If DEFAULT_ONLY is true, the search is restricted to the - default script location. */ +/* If DEFAULT_ONLY is false, try to open NAME; if that fails, look for + it in directories specified with -L, then in the default script + directory, without and with EXTEND appended. If DEFAULT_ONLY is + true, the search is restricted to the default script location. */ static FILE * ldfile_find_command_file (const char *name, const char *extend, @@ -556,10 +556,13 @@ ldfile_find_command_file (const char *name, const char *extend, char *buffer; static search_dirs_type *script_search; - /* First try raw name for uninstalled linker. */ - result = try_open (name, ""); - if (result != NULL) - return result; + if (!default_only) + { + /* First try raw name. */ + result = try_open (name, ""); + if (result != NULL) + return result; + } if (!script_search) { |