>Now a new process is loaded to memory, which utilizes a .so already in memory. How does ld.so know if the required .so is already in >memory and what is its physical address?
I think loader keeps track of which libraries are there in the memory and their location. Execuatble file of the program contains dependency information i.e. which libraries this exe depends upon. So while loading it can check whether the required library is always there or not if not then loader loads the lib into the memory.
Hopt it helps.
On 4/25/08, Shyamal Shukla <shyamalshukla@xxxxxxxxx> wrote:
Hi all,
In the case of dynamic linking, a single instance of a dynamic library is loaded into memory and mapped into the address space of each process that needs it.
Now a new process is loaded to memory, which utilizes a .so already in memory. How does ld.so know if the required .so is already in memory and what is its physical address?
Thanks and Regards,
Shyamal
--
Linux - because life is too short for reboots...
--
http://linuxexplained.blogspot.com