Hi,

I don't know if I'm missing something but I'm running into problems linking 
archived objects together.

I'm using msp430-gcc as front-end for linking:

msp430-gcc -mmcu=msp430x449 -O main.o moduleA.a moduleB.a moduleC.a -o 
output.elf
where the moduleX.a originates from the corresponding directory X and was made 
with msp430-ar

What I observed was that the order how the archives are grouped does matter.
With a certain order, I'm able to build the project (e.g. moduleA.a moduleB.a 
moduleC.a).
But when using a different order (e.g moduleC.a moduleB.a moduleA.a) I get a 
couple of link errors:
"moduleB.a(objectb.o)(.text+0x4): undefined reference to `<variable name>'"
<variable name> however is defined in objecta.o in moduleA.a

I didn't run into this problem when the project was still smaller (fewer 
objects). I can build the current project with IAR without any problems.

I'm not a expert to ld but I like to theorize that the lookup table in 
msp430-ld where all symbols are listed is not big enough.

Any ideas? 

Thanks in advance,
Dan

my environment:
Windows 2000
binary distribution: mspgcc-20030506.exe
Cygwin-shell






Reply via email to