ld doesn't relocate sysroot if called as tooldir/bin/ld

Alexandre Oliva aoliva@redhat.com
Wed Feb 26 21:43:00 GMT 2003


On Feb 26, 2003, Daniel Jacobowitz <drow@mvista.com> wrote:

> May I recommend a slightly different behavior?  It looks like, given
> "GROUP ( /lib/libc.so.6 /usr/lib/libc_nonshared.a )", your patch will
> search for $sysroot/lib/libc.so.6 and fall back to /lib/libc.so.6.  I'd
> rather it only searched the $sysroot'd version - that's how GCC does
> this.

That was the plan, for the very reasons why you want this, but given
that the semantics of pathnames in INPUT and GROUP is slightly
different from what I thought it was (it will search for full
namenames within the search dirs as well), I thought it was reasonable
to keep searching the real root.  I can make:

       if (ldfile_try_open_bfd (entry->filename, entry))
+	{
+	  entry->sysrooted = FALSE;
+	  return TRUE;
+	}

an `else if' instead, and this would behave like both of us want, with
minimal changes to the current behavior.  Would this change be
acceptable?

-- 
Alexandre Oliva   Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer                 aoliva@{redhat.com, gcc.gnu.org}
CS PhD student at IC-Unicamp        oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist                Professional serial bug killer



More information about the Binutils mailing list