Apparently there is material that must go into .rodata and .data (low
memory) that exceeds the available space, causing it to overflow into
.vectors.  See other message earlier this week for suggestions of how to
diagnose where things might be going wrong and how to rearrange things to
fit.

Peter

On Fri, Mar 1, 2013 at 12:21 PM, Andy Turk <andyt...@gmail.com> wrote:

> I'm working with a program that works fine with CCS and consumes about 45K
> of rom and 8K of ram. Linking it with mspgcc produces errors:
>
> /usr/local/msp430/lib/gcc/msp430/4.7.0/../../../../msp430/bin/ld:
> build/test.elf section `.rodata' will not fit in region `rom'
> /usr/local/msp430/lib/gcc/msp430/4.7.0/../../../../msp430/bin/ld: section
> .vectors loaded at [000000000000ff80,000000000000ffff] overlaps section
> .rodata loaded at [000000000000e860,000000000000ff80]
> /usr/local/msp430/lib/gcc/msp430/4.7.0/../../../../msp430/bin/ld: section
> .data loaded at [000000000000ff82,000000000001024c] overlaps section
> .vectors loaded at [000000000000ff80,000000000000ffff]
> /usr/local/msp430/lib/gcc/msp430/4.7.0/../../../../msp430/bin/ld: section
> .far.text loaded at [0000000000010000,0000000000010287] overlaps section
> .data loaded at [000000000000ff82,000000000001024c]
> /usr/local/msp430/lib/gcc/msp430/4.7.0/../../../../msp430/bin/ld: region
> `rom' overflowed by 717 bytes
> collect2: error: ld returned 1 exit status
> make: *** [build/test.elf] Error 1
> make: Target `default' not remade because of errors.
>
> It makes sense that the interrupt vectors (.vectors) will be loaded into
> 0xff80-0xffff, but why would .rodata overlap that by exactly one byte (at
> 0xff80)?
>
> And why is .data being put at 0xff82 where it'll stomp on the vector table?
>
> I don't believe there are any relocation attributes in the source, so this
> is most likely the default compiler/linker behavior.
>
> All the source is compiled with the same set of switches. Here's an
> example:
>
> /usr/local/msp430/bin/msp430-gcc -I/usr/local/msp430/include -std=c99 -Wall
> -Os -g -mmcu=msp430f5528 -mmemory-model=large -ffunction-sections
> -fdata-sections -DMSPGCC -Ibuild  -c main.c -o build/obj/main.o
>
> The linker is invoked like this:
>
> /usr/local/msp430/bin/msp430-gcc -mmcu=msp430f5528 -mmemory-model=large
> -Wl,-gc-sections <… many .o files …> -o build/test.elf
>
>
> ------------------------------------------------------------------------------
> Everyone hates slow websites. So do we.
> Make your web apps faster with AppDynamics
> Download AppDynamics Lite for free today:
> http://p.sf.net/sfu/appdyn_d2d_feb
> _______________________________________________
> Mspgcc-users mailing list
> Mspgcc-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/mspgcc-users
>
>
------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_feb
_______________________________________________
Mspgcc-users mailing list
Mspgcc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mspgcc-users

Reply via email to