[ECOS] calling function in different .S file problem.

Qiang Huang jameshq@liverpool.ac.uk
Wed Nov 20 14:23:00 GMT 2002


Hi all:
   I have wrote two assembly file: a.S and b.S  and c.c

In b.S file:
   .global function_a
function_a:
	xxxx
	mov xxx
                add xxx
                 xxx


in c.c file
void c_function(void)
{
     // do something here
}


in a.S file:
   Get_Address function_a   ; get the address of function_a into a register
r0
   call r0   ; try to call function_a defined in b.S file
   // but can't invoke the function_a

  Get_Address c_function  ; get the address of c_function into a register r0
  call r0    ; try to call the c_function defined in c.c file
   // succeed in callng the c function here

what's the problem that I can't call a function from another .S file while I
can call the function from .C file in assembly file?

Thanks a lot






-- 
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss



More information about the Ecos-discuss mailing list