inline assambly error?
Posted: Fri Feb 14, 2003 1:15 pm
I try to write my syscalls, therefore I make fisrt some test.
the below code will be called when the Interrupt 0x80 occure.
but when I complie it the ld bring me the error "undefined reference to `write' ". but its in another file which has been linked with this code!!.
what the error ?
void syscall(regs_t *regs)
{
__asm__ __volatile__(
"mov %0, %%ebx;
mov %1, %%ecx;
pushl %%ecx ;
pushl %%ebx ;
call write ;"
::"r"(regs->ebx), "r"(regs->ecx)
);
}
the below code will be called when the Interrupt 0x80 occure.
but when I complie it the ld bring me the error "undefined reference to `write' ". but its in another file which has been linked with this code!!.
what the error ?
void syscall(regs_t *regs)
{
__asm__ __volatile__(
"mov %0, %%ebx;
mov %1, %%ecx;
pushl %%ecx ;
pushl %%ebx ;
call write ;"
::"r"(regs->ebx), "r"(regs->ecx)
);
}