View | Details | Raw Unified | Return to bug 10340
Collapse All | Expand All

(-)ld/ldfile.c (-2 / +8 lines)
Lines 308-325 Link Here
308
     directory first.  */
308
     directory first.  */
309
  if (! entry->is_archive)
309
  if (! entry->is_archive)
310
    {
310
    {
311
      if (entry->sysrooted && IS_ABSOLUTE_PATH (entry->filename))
311
      /* For absolute pathnames, try to always open the file in the
312
	 sysroot first. If this fails, try to open the file at the
313
	 given location. */
314
      entry->sysrooted = is_sysrooted_pathname(entry->filename, FALSE);
315
      if (IS_ABSOLUTE_PATH (entry->filename) && ld_sysroot && ! entry->sysrooted)
312
	{
316
	{
313
	  char *name = concat (ld_sysroot, entry->filename,
317
	  char *name = concat (ld_sysroot, entry->filename,
314
			       (const char *) NULL);
318
			       (const char *) NULL);
315
	  if (ldfile_try_open_bfd (name, entry))
319
	  if (ldfile_try_open_bfd (name, entry))
316
	    {
320
	    {
317
	      entry->filename = name;
321
	      entry->filename = name;
322
	      entry->sysrooted = TRUE;
318
	      return TRUE;
323
	      return TRUE;
319
	    }
324
	    }
320
	  free (name);
325
	  free (name);
321
	}
326
	}
322
      else if (ldfile_try_open_bfd (entry->filename, entry))
327
328
      if (ldfile_try_open_bfd (entry->filename, entry))
323
	{
329
	{
324
	  entry->sysrooted = IS_ABSOLUTE_PATH (entry->filename)
330
	  entry->sysrooted = IS_ABSOLUTE_PATH (entry->filename)
325
	    && is_sysrooted_pathname (entry->filename, TRUE);
331
	    && is_sysrooted_pathname (entry->filename, TRUE);

Return to bug 10340