Subject: Re: static vs. dynamic runtime linking, and silly 'ld -L' breakage
To: None <tech-userlevel@NetBSD.ORG>
From: Ian Lance Taylor <ian@airs.com>
List: tech-userlevel
Date: 01/28/2005 18:21:19
der Mouse <mouse@Rodents.Montreal.QC.CA> writes:

> > Yes, I think /etc/ld.so.cache is a reasonable solution.  Defaulting
> > -R to -L is not, for reasons I already discussed.
> 
> Actually, how about a warning when either (a) the run-time path
> includes a non-absolute component or (b) the run-time path is such that
> executing the binary immediately would fail to find one or more
> libraries?  With an option to shut the warning off, of course.

I think that is a good idea.  In fact, at one time the linker issued
warnings along the lines of (b).  And the linker even reads
/etc/ld.so.conf to avoid unnecessary warnings.  And then we introduced
the --rpath-link option to give people a way to avoid even more
unnecessary warnings.  I'm not sure offhand why the linker does not
warn at present.  (I don't even know for sure that it doesn't issue
those warnings, but apparently it didn't do it for you.)

Ian