DragonFly commits List (threaded) for 2007-04
DragonFly BSD
DragonFly commits List (threaded) for 2007-04
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

Re: cvs commit: src/etc/defaults rc.conf


From: Joerg Sonnenberger <joerg@xxxxxxxxxxxxxxxxx>
Date: Sun, 15 Apr 2007 15:22:24 +0200
Mail-followup-to: commits@crater.dragonflybsd.org

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



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