crt0.o is missing with --target=i686-pc-linux-gnu

Junfeng Dong
Tue May 5 11:44:00 GMT 2015

Thanks for reply very much. with "--target=i586-linux-elf --prefix=",
it generates "cygmon-crt0.o and "cygmon.ld". But I can't use the cross
tool chain to build any program.
The run command I use is according to the newlib/README.(line 506).

/opt/newlib-0504/bin/i586-linux-elf-gcc -nostdlib -static
/opt/newlib-0504/i586-linux-elf/lib/cygmon-crt0.o  hello.c -L
/opt/newlib-0504/lib -lc -lm
warning: cannot find entry symbol _start; defaulting to
/opt/newlib-0504/i586-linux-elf/lib/cygmon-crt0.o: In function `__start':
undefined reference to `__stack'
undefined reference to `__bss_end'
undefined reference to `__install_signal_handler'

what is the correct way to create a static binary linked against newlib.

Best Regards

On Mon, May 4, 2015 at 8:02 PM, Mike Frysinger <> wrote:
> On 04 May 2015 18:06, Junfeng Dong wrote:
>> I build newlib with "--target=i686-pc-linux-gnu --prefix=", no ctr0.o
>> is compiled and installed. what is the problem?
>> My build machine is 64 bit ubuntu 14.04.
> your tuple is invalid.  "xxx-linux-gnu" means "the OS is Linux" and "the
> userland is GNU (i.e. glibc)".  you need to use something like i686-elf.
> -mike

More information about the Newlib mailing list