From owner-cvs-gnu Mon Sep 30 19:05:27 1996 Return-Path: owner-cvs-gnu Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id SAA15262 for cvs-gnu-outgoing; Mon, 30 Sep 1996 18:54:34 -0700 (PDT) Received: (from peter@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id SAA14224; Mon, 30 Sep 1996 18:52:39 -0700 (PDT) Date: Mon, 30 Sep 1996 18:52:39 -0700 (PDT) From: Peter Wemm Message-Id: <199610010152.SAA14224@freefall.freebsd.org> To: CVS-committers, cvs-all, cvs-gnu Subject: cvs commit: src/gnu/usr.bin/ld/rtld Makefile rtld.1 rtld.c sbrk.c Sender: owner-cvs-gnu@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk peter 96/09/30 18:52:36 Modified: gnu/usr.bin/ld/rtld Makefile rtld.1 rtld.c sbrk.c Log: Update to handle new version ld.so.hints and info in executable for configurable fallback search paths, as well as new crt interface version. Also: - even faster getenv(), get all environment variable settings in a single pass. - ldd printf-like format specifications - minor code cleanups, one vsprintf -> vsnprintf (harmless) The library search sequence is a little more complete now. Before, it'd search $LD_LIBRARY_PATH (by opendir/readdir/closedir), then read the hints file, then read /usr/lib (again by scanning thr directory). It would then fail if there was no "found" library. Now, it does LD_LIBRARY_PATH and the hints file the same, but then uses a longer fallback path. The -R path is fetched from the executable if specified at build time, the ldconfig path is appended, and /usr/lib is appended to that. Duplicates are suppressed. This means that simply placing a new library in /usr/local/lib will work (the same as it did in /usr/lib) without needing ldconfig -m. It will find it quicker if the ldconfig is run though. Similar changes have been made to the NetBSD ld.so, but ours is rather different now due to John Polstra's speedups and fixes from a while back. The ldd printf-like format support came direct from NetBSD. Reviewed by: nate, jdp Revision Changes Path 1.21 +10 -4 src/gnu/usr.bin/ld/rtld/Makefile 1.5 +50 -2 src/gnu/usr.bin/ld/rtld/rtld.1 1.35 +221 -54 src/gnu/usr.bin/ld/rtld/rtld.c 1.2 +3 -3 src/gnu/usr.bin/ld/rtld/sbrk.c