Hi On Fri, Apr 25, 2008 at 3:17 PM, 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? userspace doesn't know it. When it calls mmap(), kernel realizes it is mapped as shared, thus linking the new created VMA with the related .so. That way, single file is mapped to many mm_struct-s. regards, Mulyadi. -- To unsubscribe from this list: send an email with "unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx Please read the FAQ at http://kernelnewbies.org/FAQ