From owner-freebsd-questions Thu Nov 30 19:31:51 2000 Delivered-To: freebsd-questions@freebsd.org Received: from spoon.beta.com (064-184-210-067.inaddr.vitts.com [64.184.210.67]) by hub.freebsd.org (Postfix) with ESMTP id 6B1CB37B402; Thu, 30 Nov 2000 19:30:58 -0800 (PST) Received: from spoon.beta.com (localhost [127.0.0.1]) by spoon.beta.com (8.11.0/8.11.0) with ESMTP id eB13UoK32308; Thu, 30 Nov 2000 22:30:50 -0500 (EST) (envelope-from mcgovern@spoon.beta.com) Message-Id: <200012010330.eB13UoK32308@spoon.beta.com> To: Mike Meyer Cc: Brian McGovern , questions@freebsd.org, hackers@freebsd.org Subject: Re: Altering dynamic loader from within application... In-reply-to: Your message of "Thu, 30 Nov 2000 17:12:54 CST." <14886.57078.331579.149451@guru.mired.org> Date: Thu, 30 Nov 2000 22:30:50 -0500 From: Brian McGovern Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Tried it. It didn't appear to work, although it may have been something silly I did. Basically, I did a: setenv("LD_LIBRARY_PATH",".",1); I was hoping to get the loader to use the current directory to find libraries, so a later call to: dlopen("foo.so",RTLD_NOW | RTLD_GLOBAL); would find foo.so in the current directory. -Brian > Brian McGovern types: > > Therefore, is there a way to change the linker behavior once the applicati on > > has started?... Namely, the equivelent of setting LD_LIBRARY_PATH _after_ the > > application has loaded all of the initial libraries and started running, b ut > > before I get around to calling my loader? > > This may be a stupid suggestion, but I've never tried such a thing. I > do wonder about it myself and you can test it easier than I can. > > What happens if just use the setenv(3) call to change the environment? > Does that work, or is it to late for the environment to have an > effect? > > -- > Mike Meyer http://www.mired.org/home/mwm/ > Independent WWW/Unix/FreeBSD consultant, email for more information. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message