[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: ld-2.9.1: REQ: better support for relative link script paths



> The ideal solution, IMO, would be to change GNU ld so that a certain
> notation can specify a file that is only found in the same directory
> as the linker script.

Unfortunately, the truly proper behavior is not quite that simple.
Take the case of GNU/Linux and its /usr/lib/libc.so:

	GROUP ( /lib/libc.so.6 /usr/lib/libc_nonshared.a )

Here, the normal search list includes /lib, /usr/lib.  The linker script
resides in /usr/lib, but the shared library resides in /lib.  What you'd
really like to say is, "search the sublist of the search list where we
found this linker script", where "sublist" is defined as directories that
arrived together.  The default list would be such a sublist.  Then for some
cases you'd like all -L's to make a sublist, and sometimes you might want
to consider each -L independently.  So it is rather hairy.


Reply to: