Use the runpath of the main program for locating libraries loaded by

dlopen().

Reviewed by: jdp
This commit is contained in:
Doug Rabson 1998-11-27 21:19:52 +00:00
parent f2b678d4cb
commit eace1a8ad9
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=41374

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.11 1998/09/22 02:09:56 jdp Exp $
* $Id: rtld.c,v 1.12 1998/10/13 03:31:59 jdp Exp $
*/
/*
@ -1182,7 +1182,7 @@ dlopen(const char *name, int mode)
if (name == NULL)
obj = obj_main;
else {
char *path = find_library(name, NULL);
char *path = find_library(name, obj_main);
if (path != NULL)
obj = load_object(path);
}