I have added a file function.S in sys folder in XINU.
.text
.globl zfunction
zfunction:
<x86 code>
equivalent C code for this function is
long zfunction(long param)
{
long mask = 0xfff803dd ;
param &= mask ;
param = (param << 4) & 0xffffffff;
return param;
}
I need to use the function in zfunction.S in main function. How do I create a header file that links an assembly level code to C program? If I add extern int long zfunction(param) in the header file, make fails with the error
main.o(.text+0x1e): In function `main':
: undefined reference to `zfunction'
make: *** [xinu.elf] Error 1