[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [avr-gcc-list] RE: internal error: out of range error (Theodore A. R
Theodore A. Roth
Re: [avr-gcc-list] RE: internal error: out of range error (Theodore A. Roth)
Mon, 13 Sep 2004 08:34:09 -0700 (PDT)
On Sat, 11 Sep 2004, Dafni & Robert Berger wrote:
> Ted wrote:
> >No, the linker scripts come from binutils.
> >The avrN.x scripts have the correct ALIGN(2) parts and would not show
> >this error if used.
> That's correct, if I have my suspicions line in the testcase only, there is
> no problem.
> Unfortunately I like to program components, which end up in libraries.
> >Robert, why are you using the *.xr scripts instead of the *.x versions?
> If I use the avrN.x to build my libraries, I get the errors, you see below
> when I try to link an executable, which uses my libraries.
> That's why I made it a habit to use different linker scripts for libraries
> and executables.
> *.r for libraries and *.x for executables.
> As you can see, there are multiple definitions of some symbols in the .x
> linker scripts.
> Also it's a matter of style, but I like to write small modules, which end up
> in libraries, which I can test and debug easily.
> What you see here as one example project uses a library, which initialized
> the hardware, the serial driver, the RTOS, the 7-Segment
> driver and the testcase for the 7-Segment Driver.
Why are you using using the linker to build your libraries? I build libs
all the time and it only involes compiling and then stuffing the object
files into the lib with avr-ar. After that, building the final app only
uses a single link stage and the single linker script (*.x in all my
projects so far).
Maybe I'm missing something, but I don't understand why (or how) you are
using the linker to build your libraries. The object files are already
relocatable, stuffing them into the lib archive shouldn't change that.
So, it seems to me that you are trying to build a relocatable executable
instead of a library.
PGP Key ID: 0x18F846E9
Jabber ID: address@hidden