Subject: Re: patch to allow /etc/ld.so.conf configure directories for ELF
To: I can teach you how to fish... <greywolf@starwolf.com>
From: Chris G. Demetriou <cgd@netbsd.org>
List: tech-userlevel
Date: 03/11/1999 10:38:43
greywolf@starwolf.com (I can teach you how to fish...) writes:
> ...but isn't RPATH used in conjunction with LPATH when cross-compiling?

What are you talking about?  Do you have any idea what RPATH is?
(I have no idea what LPATH is, or even that it is.)

RPATH has a very specific meaning in the context of ELF.


> ...and isn't ld.so.conf useful during a standard compile?

What do you mean?


> Forgive my ignorance, but I don't see that the two are mutually exclusive.

You can use ELF RPATH specs in conjunction with ld.so.conf, and have a
functional result.

However, the rationale behind them are, pretty much, mutually
exclusive.

Use of RPATH indicates that, when compiling, the final library
directory paths are known and can be put into the binaries.
i.e. something like ld.so.conf is unnecesary.

Use of ld.so.conf indicates that when compiling, library directory
paths are not known.


Using them together leaves you in the situation where either:

(1) the paths specified in RPATH directives are correct, and the paths
in ld.so.conf are therefore unnecessary, or

(2) the paths specified in RPATH directives are incorrect, in which
case you want to use ld.so.conf's paths, but may encounter
... interesting behaviour if there exist libraries you're searching
for in the RPATH'd directory/directories...


So, in my opinion, technically they are not mutually exclusive, but
conceptually, and probably from a security/reliability perspective,
they are.



cgd
-- 
Chris Demetriou - cgd@netbsd.org - http://www.netbsd.org/People/Pages/cgd.html
Disclaimer: Not speaking for NetBSD, just expressing my own opinion.