The ELF specification says that the RPATH in the executable or

shared object takes precedence over LD_LIBRARY_PATH.  Make the
dynamic linker do it that way.
This commit is contained in:
John Polstra 1999-04-09 06:42:00 +00:00
parent 1f692d4094
commit a18cde535d
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=45510

View file

@ -22,7 +22,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* $Id: rtld.c,v 1.19 1999/04/07 02:48:43 jdp Exp $
* $Id: rtld.c,v 1.20 1999/04/09 00:28:31 jdp Exp $
*/
/*
@ -659,10 +659,10 @@ find_library(const char *name, const Obj_Entry *refobj)
dbg(" Searching for \"%s\"", name);
if ((pathname = search_library_path(name, ld_library_path)) != NULL ||
(pathname = search_library_path(name, gethints())) != NULL ||
(refobj != NULL &&
if ((refobj != NULL &&
(pathname = search_library_path(name, refobj->rpath)) != NULL) ||
(pathname = search_library_path(name, ld_library_path)) != NULL ||
(pathname = search_library_path(name, gethints())) != NULL ||
(pathname = search_library_path(name, STANDARD_LIBRARY_PATH)) != NULL)
return pathname;