Re: Linux 2.6.x.x Execution Process Question

From: Jirka Kosina
Date: Sat Jul 09 2005 - 04:53:23 EST


On Fri, 8 Jul 2005, u u wrote:

> 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() -> ?

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.

> 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.

--
JiKos.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/