cvs commit: src/etc/defaults rc.conf
Joerg Sonnenberger
joerg at britannica.bec.de
Sun Apr 15 06:23:22 PDT 2007
On Sun, Apr 15, 2007 at 12:32:17PM +0200, Simon 'corecode' Schubert wrote:
> Isn't it possible to have an implicit -rpath setting? So for instance, if
> I link -L/usr/lib/foo -lfoo that the binary will get /usr/lib/foo as rpath
> (if libfoo was found there).
I think AIX did that at one point. Interesting security issues is the
best way to descripe it, e.g. -L. makes it quite easy to exploit such
programs... Solaris did it for absolute names, I think, which is not
that much better.
The next problem is that the separation of -rpath and -rpath-link exists
for a reason, removing the second makes it impossible to link against
libraries from the same build without strong ordering on installation
and relinking.
In short: -L works only for static linkage very well. Everything else
already needs a combination of -rath and -L to work correctly. I've
tried to hack gcc to *always* create -rpath flags even for the standard
libs, but that would have needed a lot of hacking e.g. in libtool, so I
gave up for now.
Joerg
More information about the Commits
mailing list