On Tue, Feb 26, 2002 at 10:10:05AM +0100, Lambert Duijst wrote:
> Is glibc normally dynamically linked ? (I guess it is?) and if so what is
> the part of ld.so in this ?

You actually mean ld-linux.so.2.  It is responsible for resolving library
data and code references, ie doing the dynamic linking from binary to
library, and library to library.

> Is ld.so an executable or is it a library ?

ld-linux.so.2 should be executable.  You can run it followed by the name
of the binary, eg:

/lib/ld-linux.so.2 /bin/ls

is the same as:

/bin/ls

> If I want to execute an executable that is dynamically linked to a library 
> (say glibc) and I call execve to have this file executed, what are the steps 
> that the kernel makes, and how does it interact with ld.so ?

The kernel clears out the reminents of the existing binary, and then maps
various sections from the new executable that are marked LOAD.  It also
looks for the .interp section which contains the filename for ld-linux.so.2.
and does a similar process there.

The kernel then sets the program start address to either the binary's
entry address, or if there was a .interp section, the start address in the
ld-linux.so.2 binary and returns control to userspace.

_______________________________________________
http://lists.arm.linux.org.uk/mailman/listinfo/linux-arm
http://www.arm.linux.org.uk/armlinux/mailinglists.php
Please visit the above addresses for information on this list.

Reply via email to