Linux 2.6.x.x Execution Process Question
Hello,
Im looking for some help on some research I am conducting. Im trying to understand the complete execution process from start to finish of an ELF executable object on the i386 platform in particular, but x86_64 works as well. So far I have come up with the following:
Shell passes arguments and environment to execve() -> sys_execve() -> do_execve() -> search_binary_handler() -> ?
Is this complete in a very generic way? What specifics happen along the way?
Most of the papers I have found on this are from older kernel versions 2.0 and 2.2. Im trying to find out the specifics of it all, for example which registers are zeroed out before passing control to userspace and where it happens. How does the stack look when control is passed? These types of specifics are what I had in mind.
If anyone can point me in the right direction or provide an explanation it would be helpful. Thank you.
-us
Quoted 6 lines · u u
Im looking for some help on some research I am conducting. Im trying to understand the complete execution process from start to finish of an ELF executable object on the i386 platform in particular, but
x86_64works as well. So far I have come up with the following:
Shell passes arguments and environment toexecve()->sys_execve()->do_execve()->search_binary_handler()-> ?
If you are looking specifically for handling of the ELF format, then you have stopped your sequence sooner than it began to be interesting :)
search_binary_handler() then passes, in the case of the ELF object, the control to the function load_elf_binary(), implemented in fs/binfmt_elf.c
This is the place where the "execve() process" starts being object-type specific.
Quoted 4 lines
2.0 and 2.2. Im trying to find out the specifics of it all, for example which registers are zeroed out before passing control to userspace and where it happens. How does the stack look when control is passed? These types of specifics are what I had in mind.
You will find all this in load_elf_binary() and it's surroudings.
Signature · 1 line
JiKos.