7 Apr 2013 05:39
Re: how does ld.so call ELF's entry?
ishare <june.tune.sea <at> gmail.com>
2013-04-07 03:39:13 GMT
2013-04-07 03:39:13 GMT
On Sun, Apr 07, 2013 at 05:11:28AM +0200, Sofiane Akermoun wrote: > Hello, > > > The interpreter is specified during linking process and the program header > of your binary is filled with good values. > Then when the operating system load your binary, he finds next the > interpreter to use. > The linker ld sets the good values by default but you can overwrite it or > specify other values if you want. > The steps are: > 1)The operating system loads your binary > 2)The program loader system execute the Interpreter specifiy in the binary > 3)The interpreter gather all the dynamic libraries needed in memory > 4)The Control is passed to the entry point of your program How does the step 4 been done ? thanks! > > The entry point is specified in your code source as a "global". And could > be find in your object file by the linker. > In theory there are some default tag to specify entry point, like "..start" > for nasm, but you can also passed it to the linker. > > regards, > > Sofiane Akermoun > akersof <at> gmail.com(Continue reading)
RSS Feed