Search notes:

dynamic loader

/lib/ld-linux.so.2, ld-linux-x86-64.so.2
The dynamic loader finds and loads executables and shared libraries when a program is run.
By default, such shared libraries are in /lib and /usr/lib. The file /etc/ld.so.conf can be used to specifiy additional search paths.
Determine the name of the dynamic loader with readelf -l executable | grep interpreter, for example readelf -l $(which ls) | grep interpreter.
The dynamic loader must not be confused with the standard-linker (ld).

Starting an executable

Read the executable's header to determine data and text segment sizes.
Create address space for these segments plus stack.
Copy data and text segments into created address space.
Copy program arguments onto stack.
Initialize registers. Most of them are just cleared, however, esp is set to point to stack's top.
Jump to a start up routine (main?). This routine should call the exit syscall when the executable is done with its work.

See also

dynamic linker

Index