This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: crt{i,n}.o
- To: obrien at FreeBSD dot org
- Subject: Re: crt{i,n}.o
- From: Geoff Keating <geoffk at cygnus dot com>
- Date: 24 Oct 2000 12:50:25 -0700
- CC: gcc at gcc dot gnu dot org
- References: <20001024045816.A84779@dragon.nuxi.com>
"David O'Brien" <obrien@FreeBSD.org> writes:
> Since GCC provides its own crtbegin.o and crtend.o, why doesn't it
> provide its own crti.o and crtn.o?
crti.o and crtn.o are, by definition, provided by the target system.
This is so that:
- objects built with different compilers can be linked together; and
- the target system has a place to put any hooks it needs.
GCC wouldn't need to provide a separate crtbegin.o or crtend.o if it
was providing crt[in].o.
> Considering the required content of crti.S and crtn.S, it seems that
> crtstuff.c makes an assumption on the contents of crt{i,n}.S that
> may not hold in the base system's versions.
What assumption?
Since crt[in].o are primarily provided to support crt{begin,end}.o,
I'd suspect that crtstuff doesn't make any assumptions, it imposes
requirements.
--
- Geoffrey Keating <geoffk@cygnus.com>