Re: Dynamic linking on Linux

2008-04-26 Thread Erik Mouw
On Sat, Apr 26, 2008 at 12:45:12PM +0530, Pranav Peshwe wrote: > How does the kernel figure out that a particular file/library is already > opened and mmaped to a particular address ? Does it scan through the list of > open files or is there any information kept in the inode for the file or is > th

Re: Dynamic linking on Linux

2008-04-26 Thread Pranav Peshwe
On Fri, Apr 25, 2008 at 6:51 PM, Erik Mouw <[EMAIL PROTECTED]> wrote: > On Fri, Apr 25, 2008 at 03:01:23PM +0530, sahlot arvind wrote: > > >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 > > wha

Re: Dynamic linking on Linux

2008-04-25 Thread Erik Mouw
On Fri, Apr 25, 2008 at 03:01:23PM +0530, sahlot arvind wrote: > >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

Re: Dynamic linking on Linux

2008-04-25 Thread sahlot arvind
>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 c

Re: Dynamic linking on Linux

2008-04-25 Thread Mulyadi Santosa
Hi On Fri, Apr 25, 2008 at 3:17 PM, Shyamal Shukla <[EMAIL PROTECTED]> 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 memo

Dynamic linking on Linux

2008-04-25 Thread Shyamal Shukla
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 alre