Re: using ld-linux.so to load private libraries
- From: "Nils O. Selåsdal" <NOS@xxxxxxx>
- Date: Thu, 22 Dec 2005 07:37:45 +0100
circusfire wrote:
Hello All,
I am not an expert on linux , but have been using it in my profession for quite some time and understand things reasonably well. Here I have a problem:
I am writing an application "App" for a platform "Platfrom". "Platfrom"
has a simulator and uses certain "libraries" . However even my app uses the same libraries. In order to run the "App" from the simulator, I need to depoly the "App" in specifc directory and write an application descriptor for it.
The "libraries" used by "Platform" are in directory /opt/host/Platfrom/lib The "libraries" used by my application are in /usr/local/Platfrom/lib
When I launch the simulator and try to run the "App" on it, the App runs - but it uses the "libraries" of the "Platform" and not mine. What happens is that when I run the "App" on the simulator, loader already finds the
appropriate libs [ in this case Platform's libs ] are already loaded and links my app with them.
What I need is , the ability to create a "sand box" environment in which my "App" loads my "shared libraries" and execute. Linking "App" statically is not an option I am looking for.
Now, looking at whatever meager documentation I could lay my hands on ld-linux.so, it appears that I can ask the dynamic loader to load specifc libraries I would want along with the app.
Any pointers are appreciated.
It isn't clear by your description what you need. Perhaps all you need is to set the LD_LIBRARY_PATH environment variable to point to a certain location, so shared libs will be loaded from that location instead of the default ? See also the LD_PRELOAD environment variable. man ld.so provides more information. .
- References:
- using ld-linux.so to load private libraries
- From: circusfire
- using ld-linux.so to load private libraries
- Prev by Date: Re: blocking on write to shared memory?
- Next by Date: Re: The best way to delete some files inside an ISO9660 image file
- Previous by thread: Re: using ld-linux.so to load private libraries
- Index(es):
Relevant Pages
|