This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
PATCH: PR ld/10047: [Regression] ld-new -m XXX no longer works
- From: "H.J. Lu" <hongjiu dot lu at intel dot com>
- To: binutils at sources dot redhat dot com
- Date: Sat, 11 Apr 2009 07:04:27 -0700
- Subject: PATCH: PR ld/10047: [Regression] ld-new -m XXX no longer works
- Reply-to: "H.J. Lu" <hjl dot tools at gmail dot com>
Hi,
I am checking in this patch to restore try raw name first for default
linker script.
H.J.
---
2009-04-11 H.J. Lu <hongjiu.lu@intel.com>
PR ld/10047
* ldfile.c (ldfile_find_command_file): First try raw name.
--- ld/ldfile.c.foo 2009-04-10 16:25:59.000000000 -0700
+++ ld/ldfile.c 2009-04-11 06:54:58.000000000 -0700
@@ -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 *na
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)
{