Date: Thu, 30 Nov 2000 22:30:50 -0500 From: Brian McGovern <mcgovern@spoon.beta.com> To: Mike Meyer <mwm@mired.org> Cc: Brian McGovern <mcgovern@spoon.beta.com>, questions@freebsd.org, hackers@freebsd.org Subject: Re: Altering dynamic loader from within application... Message-ID: <200012010330.eB13UoK32308@spoon.beta.com> In-Reply-To: Your message of "Thu, 30 Nov 2000 17:12:54 CST." <14886.57078.331579.149451@guru.mired.org>
next in thread | previous in thread | raw e-mail | index | archive | help
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 <mcgovern@spoon.beta.com> 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 > -- > Mike Meyer <mwm@mired.org> 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-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200012010330.eB13UoK32308>