2009-04-13 H.J. Lu <hongjiu.lu@intel.com>
authorH.J. Lu <hjl.tools@gmail.com>
Tue, 14 Apr 2009 02:47:22 +0000 (02:47 +0000)
committerH.J. Lu <hjl.tools@gmail.com>
Tue, 14 Apr 2009 02:47:22 +0000 (02:47 +0000)
* ldfile.c (ldfile_find_command_file): Revert the last change.

ld/ChangeLog
ld/ldfile.c

index 6e593190fd6accc2567a82ee95c3a404a1f9590b..58144b6b82a50d3d426d5daccaae61443a295135 100644 (file)
@@ -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
index 2aff7139643a7cafee73855f6081b01f9c2c1f5d..422416a8b442a92d57febe60195fe51ee79ec999 100644 (file)
@@ -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)
     {
This page took 0.027381 seconds and 4 git commands to generate.