AnsweredAssumed Answered

Linker Loop Hole

Question asked by ksweet on Sep 12, 2011
Latest reply on Sep 13, 2011 by CraigG

I've got two *.asm files in my project, call them File1.asm and File2.asm.  I have a function in File1 that I want to call from File2.  I get a linker error:

 

[Error li1021]  The following symbols referenced in processor 'p0' could not be resolved:
        'Foo [_Foo]' referenced from '.\Debug\File2.doj'

 

I just can't figure out what I'm missing here, why the symbol isn't appearing as a global symbol... Can you please help me?

 

 

Here's what I'm doing:

 

=============== File1.asm ============

 

.SECTION L1_code;

.ALIGN 4;

 

.GLOBAL _Foo;
.TYPE _Foo, STT_FUNC;

 

_Foo:

 

// stuff is done in _Foo - it is not empty

 

rts;

 

._Foo.end:   

 

 

 

 

 

=============== File2.asm ============

 

.SECTION L1_code;

.ALIGN 4;

 

.GLOBAL _ClientFunction;
.TYPE _ClientFunction, STT_FUNC;

 


.extern _Foo;
.type _Foo,STT_FUNC;

 

_ClientFunction:

 

// do stuff

 

call _Foo;

 

rts;

 

._ClientFunction.end:

Outcomes