This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: Help?
- To: Kwanghoon Choi <khchoi at ruby dot kaist dot ac dot kr>
- Subject: Re: Help?
- From: Alexandre Oliva <aoliva at redhat dot com>
- Date: 03 Jan 2001 00:55:19 -0200
- Cc: gcc-help at gcc dot gnu dot org
- Organization: GCC Team, Red Hat
- References: <Pine.SOL.4.05.10101031040190.23560-100000@ruby.kaist.ac.kr>
On Jan 3, 2001, Kwanghoon Choi <khchoi@ruby.kaist.ac.kr> wrote:
> I would like to know the precise sequence of loading and execution of
> a given executable.
I believe this depends on the kernel and on the C library, and not on
the compiler. That's why you won't find any documentation about this
in the compiler manual.
> First, I don't know who really calls __libc_start_main() functions.
I *think* that would be ld.so, or whatever other INTERPRETER name
encoded in the executable. I think that's what loads the actual
executable, relocates it, runs its initializers and calls the main
function. But then, I'm just a compiler engineer, and I don't
understand the internals of the GNU/Linux C library/kernel.
--
Alexandre Oliva Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer aoliva@{cygnus.com, redhat.com}
CS PhD student at IC-Unicamp oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist *Please* write to mailing lists, not to me