I think options like this could also be the cause of prcoder's problems
getting the current Makefile to build, since the linice_kernel.o module
is not currently being built by the proper 2.6 Kbuild. There is a
chance that some config option (maybe -mregparm=3 or something similar)
which would normally be used by kbuild to compile an object with gcc is
being left out. This may mean that using nasm is going to continue to
break things in the future, since its command line compile time options
will not likely ever be supported by the kernel directly, and many
user-settable kernel config options effect the way things should be
compiled.
On my FC3 ld crashes when linking linice.o because of i386.o too.
I have fixed this as follows:
--- i386.asm.GENERIC 2004-12-24 13:30:14.590636699 +0300
+++ i386.asm 2004-12-23 13:10:10.000000000 +0300
@@ -1142,7 +1142,8 @@
mov ax, word [0C0106E41h]
cmp ax, 0F4FBh ; FB sti
jnz @skip ; F4 halt
- call 0C0106E41h
+ mov eax, 0C0106E41h
+ call eax
@skip:
pop eax
ret
But anyway I still can't load linice via linsym -i as prcoder.
Distro: FC3
Shipped kernel: 2.6.9-1.667smp (but system has only one processor)
vermagic for linice.ko: 2.6.9-1.667smp SMP 686 REGPARM 4KSTACKS gcc-3.4
InterruptPoll:
halt
; This is for SuSe running under VmWare - makes it less CPU
intensive
; since VmWare yields CPU on kernel HALT, not our HALT
push eax
mov ax, word [0C0106E41h]
cmp ax, 0F4FBh ; FB sti
jnz @skip ; F4 halt
call 0C0106E41h
@skip:
pop eax
ret
NASM for some reason silently skips 'halt' instruction. And other SuSe
specific code leads to that loading problem. If I comment code from
'halt' to 'ret' than the module is loaded and started, otherwise insmod
write 'Verify ELF error [sec 2 rel 367]'.
Maybe we need to comment out this code and place 'htl' instruction
instead of it ?
Change:
In the InterruptPoll(), removing VmWare-specific test code and
changing HALT instruction into HLT. NASM somehow ignores HALT keyword.
Affected files ...
//depot/linice/linice/i386.asm#41 edit