Could my understanding of 'crti.o' in a ARM cross compile be verified?

Ian Lance Taylor iant@google.com
Wed Jul 28 14:58:00 GMT 2010


Jamie Risk <jamie@subject2risk.com> writes:

> But the presence of the `crti.asm` source file
> (`gcc-4.5.0/gcc/config/arm/crti.asm`) is misleading me.  Why is
> it there? Is it for bare metal targets (sans glibc & Linux)?

Right: it's only for the arm-elf target.

> And it may not be fair to ask here, but why do cross compiling
> hints/hacks for the ARM often cite making changes to
> `gcc-4.5.0/gcc/config/arm/t-linux` so that `crti.asm` file in the same
> directory *does* get built and linked?

I don't know.  I would not expect the simple crti.asm shipped with gcc
to suffice for glibc, but perhaps it does.

> I guess I'm seeking an answer to the paradox: which comes first,
> glibc or gcc?  I'm assuming that gcc does, but in a static form
> that allows it to compile glibc, then use that to do a 'proper' gcc
> build.

Yes, precisely.

Ian



More information about the Gcc-help mailing list