Subject: Re: kernel with 'options COMPAT_LINUX'
To: Heliodoro Tammaro <helio@tacheles.de>
From: Bill Studenmund <wrstuden@nas.nasa.gov>
List: port-mac68k
Date: 05/26/1999 15:46:12
On Wed, 26 May 1999, Heliodoro Tammaro wrote:
> when i try to compile my kernel (1.4) with 'options COMPAT_LINUX' i get the
> following message:
>
>
> cpp -traditional -D_LOCORE -I. -I../../../../arch -I../../../.. -nostdinc
> -DHZ="0x3c" -DM68030 -DLKM -DDIAGNOSTIC -DMAXUSERS=16 -D_KERNEL -Dmac68k
> ../../../../compat/linux/arch/m68k/linux_sig_machdep.S | sed -e 's/^#.*//'
> | as -o linux_sig_machdep.o
> {standard input}: Assembler messages:
> {standard input}:316: Error: "instruction/operands mismatch" -- Statement
> 'moveq #LINUX_SYS_exit,d0' ignored
> *** Error code 1
>
> Stop.
>
>
> the 'guilty' code in compat/linux/arch/m68k/linux_sig_machdep.S is:
>
>
> /*
> * Signal "trampoline" code for Linux emulation.
> * The sigtramp for Linux/m68k is on the stack frame, and this is a dummy.
> */
> .align 2
> GLOBAL(linux_sigcode)
> moveq #LINUX_SYS_exit,d0 | _exit(?)
> trap #0
> .align 2
> GLOBAL(linux_esigcode)
>
>
> in my compat/linux/arch/m68k/linux_syscall.h LINUX_SYS_exit is defined as:
>
> /* syscall: "exit" ret: "int" args: "int" */
> #define LINUX_SYS_exit 1
>
> does anybody get the same error? can somebody explain me what's going on there?
The fact that LINUX_SYS_exit is showing up in the assembler's error
message means that the pre-processor didn't make the substitution. I
expect that linux_sig_machdep.S isn't including linux_syscall.h correctly.
Take care,
Bill