This is the mail archive of the newlib@sourceware.org mailing list for the newlib project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Qs about runtime support libs like crt0.o


I'm tasked with bringing up an Xscale PXA320 board from scratch (no OS), using GNU tools. I can build simple code (no newlib) that works fine, but I'm having some trouble with newlib.

I want to thoroughly understand the GCC C runtime and associated glue, and so, I have some questions:

1) Does Newlib replace all the crtX.o files used by a typical GCC build? At first I thought not, but then I noticed it does built crt0.o. However, I haven't seen any of the other gcc-provided cr libraries (crti.o, crtbegin.o, crtend.o, crtn.o). Do I still need to use GCC's versions?

The problem is that I need to link with a linker script, and I think that requires calling ld directly, rather than letting gcc invoke collect2.

2) I'm a little overwhelmed by all the stuff a newlib build produces. There seem to be many options not covered by configure --help (for example, what is "interwork?"), and the resulting build seems to include a great many duplicates. It produced an "arm-elf" directory that contained several more directories ("be," "fpu," "interwork," "newlib," "nofmult," "thumb"), many of which in turn contain a "newlib" directory, etc. There are multiple copies of libc.a, crt0.o, etc, presumably with various differences.

Is there something that explains the various additional options, and what gets built?

3) The README talks about how newlib uses build and host rather than GCC's build, host and target, but in that section does not say that target is reinterpreted to mean host. In other parts of the README, it implies (and even explicitly states) that "target" is reinterpreted by "configure" to do the right thing.

Okay, that's probably enough for now. I sure do appreciate any help. Thanks!

--
Rick


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