avr-gcc-list
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [avr-gcc-list] GCC Testing having problem with main returning - libr


From: Joerg Wunsch
Subject: Re: [avr-gcc-list] GCC Testing having problem with main returning - libr
Date: Tue, 15 Jan 2008 21:34:39 +0100 (MET)

<address@hidden> wrote:

> I dont think I should be picking up libc I am trying a vanilla build
> of gcc-avr. gcc should be providing everything - except binutils.

No, you need the C run-time startup code (crtXXX.o).  This code used
to just jump to main() previously, since the function main() was
special-cased inside GCC, and would never really return.  Instead, the
special-casing caused it to eventually append a jump to _exit().

Since the special-casing has been removed meanwhile (main() is
supposed to be a normal function by default, which can be called), the
gcrt1.S file in the library had to be adapted so it now properly
performs the equivalent of:

        exit(main());

-- 
cheers, J"org               .-.-.   --... ...--   -.. .  DL8DTL

http://www.sax.de/~joerg/                        NIC: JW11-RIPE
Never trust an operating system you don't have sources for. ;-)




reply via email to

[Prev in Thread] Current Thread [Next in Thread]