[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [avr-gcc-list] Specifying crt*.o file
From: |
Matthew Lee |
Subject: |
Re: [avr-gcc-list] Specifying crt*.o file |
Date: |
Thu, 10 Jan 2002 08:21:39 +1100 |
Anton,
As far as I remember, if you compile and link in one step (with
avr-gcc), it will automatically include crt*.o at the linking stage. If
you've specified crt*.o on the gcc command line as well, it will attempt
to link it twice (and thus the duplicate symbol error you are seeing).
If you don't do the linking step with avr-gcc but with avr-ld, then you
can specify the crt*.o file on the linker command line (as Scott
suggested below) and you shouldn't get your duplicate symbol problem.
Regards,
Matt
Anton Erasmus wrote:
>
> Hi,
>
> If I specify the crt file explicittely on the command line, I get
> "Duplicate Symbol" errors. It seems that the default crt file is still
> linked in as well. I cannot find the option, that tells gcc not to link
> in the default crt file.
>
> The -nostartfiles option that reinhard jessich suggested, gives the
> warning "unknown option nostartfiles".
>
> For the moment I have edited the specs file to change the name of
> the default crt file, but this is a complete hack.
>
> Regards
> Anton
>
> > Hello Anton,
> >
> > Just specify the crt*.o file on the linker command line. The important
> > thing to remember is to PUT IT FIRST (ie before any other .o files).
> > This will ensure (I only say this from experience) that the contents
> > are put at address zero.
> >
> > Regards,
> >
> > Scott
> >
> > Anton Erasmus wrote:
> > >
> > > Hi,
> > >
> > > I am trying to use a custom start-up file with avr-gcc. How does one
> > > force the linker to link with a specified crt file in stead of the
> > > default crt*.o file ?
> > >
> > > Regards
> > > Anton
> > >
> > > avr-gcc-list at http://avr1.org
> > avr-gcc-list at http://avr1.org
> >
>
> avr-gcc-list at http://avr1.org
avr-gcc-list at http://avr1.org