summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2009-04-11 14:06:56 +0000
committerH.J. Lu <hjl.tools@gmail.com>2009-04-11 14:06:56 +0000
commit6dc6e8343321b890635f465361bdb7b5cafa65a2 (patch)
tree2da21351f4b84da9e98255d34178b2eff09d42cc
parentae5063603273f8ba4a6f4cacb29b4d3b454f0e83 (diff)
downloadbinutils-6dc6e8343321b890635f465361bdb7b5cafa65a2.tar.gz
binutils-6dc6e8343321b890635f465361bdb7b5cafa65a2.tar.bz2
binutils-6dc6e8343321b890635f465361bdb7b5cafa65a2.zip
2009-04-11 H.J. Lu <hongjiu.lu@intel.com>
PR ld/10047 * ldfile.c (ldfile_find_command_file): First try raw name.
-rw-r--r--ld/ChangeLog5
-rw-r--r--ld/ldfile.c19
2 files changed, 13 insertions, 11 deletions
diff --git a/ld/ChangeLog b/ld/ChangeLog
index d6c0bbd9331..6e593190fd6 100644
--- a/ld/ChangeLog
+++ b/ld/ChangeLog
@@ -1,3 +1,8 @@
+2009-04-11 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR ld/10047
+ * ldfile.c (ldfile_find_command_file): First try raw name.
+
2009-04-09 Nick Clifton <nickc@redhat.com>
PR 9824
diff --git a/ld/ldfile.c b/ld/ldfile.c
index 422416a8b44..2aff7139643 100644
--- a/ld/ldfile.c
+++ b/ld/ldfile.c
@@ -542,10 +542,10 @@ find_scripts_dir (void)
return NULL;
}
-/* 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. */
+/* 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,13 +556,10 @@ ldfile_find_command_file (const char *name, const char *extend,
char *buffer;
static search_dirs_type *script_search;
- if (!default_only)
- {
- /* First try raw name. */
- result = try_open (name, "");
- if (result != NULL)
- return result;
- }
+ /* First try raw name for uninstalled linker. */
+ result = try_open (name, "");
+ if (result != NULL)
+ return result;
if (!script_search)
{