From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alexandre Oliva To: Kwanghoon Choi Cc: gcc-help@gcc.gnu.org Subject: Re: Help? Date: Tue, 02 Jan 2001 19:37:00 -0000 Message-id: References: X-SW-Source: 2001-01/msg00006.html On Jan 3, 2001, Kwanghoon Choi 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