[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [avr-gcc-list] out of range error
From: |
Erik Christiansen |
Subject: |
Re: [avr-gcc-list] out of range error |
Date: |
Thu, 19 Feb 2004 11:19:57 +1100 |
User-agent: |
Mutt/1.3.28i |
On Wed, Feb 18, 2004 at 01:25:05PM -0500, cswiger wrote:
> Hi All - Anyone know if this is a bug: we have some code,
> a bunch of data, followed by more code. At one point everything
> complies and runs fine. But by adding a little more data we
> start getting link errors:
...
> > : internal error: out of range error
If an odd number of data bytes is inserted in the .text section, this
uninformative message is generated. Two easy ways to avoid doing that are:
o Put the data in a section that does not contain code. (Or at the end
of a code section.)
o In assembler, insert a:
.align 1
after the data, to make the code (byte) address even again.
The 'C' syntax is along the lines of:
__attribute__ ((aligned (n))) /* Try n=1, then n=2 */
(Haven't tried it in 'C', so can't guarantee that the alignment
argument is 2^n, as it is for the assembler.)
HTH,
Erik
_______________________________________________
avr-gcc-list mailing list
address@hidden
http://www.avr1.org/mailman/listinfo/avr-gcc-list