Thursday, May 29, 2008

Process Execution( Programming)

What happens when a process is executed.
1. The Kernel will load the required program ( a ELF Object) into memory and also load the runtime linker ( ld.so.1(1)) into memory.
2. The kernel then transfers control initially to the runtime linker.
3. Its runtime linkers job to examine the program loaded and find any dependencies it has ( in the form of a shared objects), load those shared objects into memory , and then bind all of the symbol binds ( function calls, data references, etc...) from the program to each of those dependencies. Of course , as it loads each shared object it must in turn do the same examination on each of them and load any dependencies they require.
4. Once all of the dependencies are loaded and their symbols have been found - the runtime linker will fire the .init sections for each shared object loaded and finally transfer control to the executable, which call main().

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home