bug-hurd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: gcc 3.3.x and profile


From: Niels Möller
Subject: Re: gcc 3.3.x and profile
Date: 23 Aug 2003 09:01:14 +0200
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2

"Alfred M. Szmidt" <ams@kemisten.nu> writes:

> Is there a reference of what all the crt files are supposed todo?  If
> not, could someone tell me what they do?

crt*.o and similar files are startup code. I.e. code that is linked
automatically into the binaries when you link C programs, and is
executed before main is called. It's responsible for things like
initializing libc, and getting things like environment, arguments,
stdin and stdout, etc, from the operating system so that they can be
passed to main and the rest of the C program in the standard way.

So it's a component of the ANSI-C implementation. I think the
responsibility is split between gcc (the startup code in crt*.o) and
libc (the function _main), but I'm not quote sure how this all fits
together.

Perhaps you knew all this already, then you need to ask more
specificly.

/Niels




reply via email to

[Prev in Thread] Current Thread [Next in Thread]