This is the mail archive of the gcc@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: crt{i,n}.o


"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>

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