This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Help?


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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]