Originally Posted by
matsp
But I suppose you could remove -fomit-frame-pointer, which -pg is incompatible with...
yes, but -fomit-frame-pointer is wanted and -pg is unwanted, therefore I think it's better to remove the -pg switch. But, I don't know where it comes from.
I try to compile without -fomit-frame-pointer:
Code:
~/acerhk-0.5.35/# make
make -C /lib/modules/`uname -r`/build SUBDIRS=/home/acerhk-0.5.35 modules
make[1]: Entering directory `/usr/src/linux-2.6.27.7´
CC [M] /home/user/acerhk-0.5.35/acerhk.o
... a warning ...
/home/user/acerhk-0.5.35/acerhk.c: In function 'call_bios_52x':
/home/user/acerhk-0.5.35/acerhk.c:615: error: bp cannot be used in asm here
make[2]: *** [/home/user/acerhk-0.5.35/acerhk.o] Error 1
make[1]: *** [_module_/home/user/acerhk-0.5.35] Error 2
make[1]: Leaving directory `/usr/src/linux-2.6.27.7´
make: *** [acerhk.ko] Error 2
~/acerhk-0.5.35/#
that's the function, line 615 is the last line
Code:
static asmlinkage void call_bios_52x(struct register_buffer *buf)
{
if (bios_routine) {
local_irq_disable();
__asm__ __volatile__(
"movl %2,%%edx\n\t"
"pusha\n\t"
"movl %%edx,%%ebp\n\t"
"movl (%%ebp),%%eax\n\t"
"movl 4(%%ebp),%%ebx\n\t"
"movl 8(%%ebp),%%ecx\n\t"
"movl 12(%%ebp),%%edx\n\t"
"movl 16(%%ebp),%%edi\n\t"
"movl 20(%%ebp),%%esi\n\t"
"pushl %%ebp\n\t"
"movl %1, %%ebp\n\t"
"call *%0\n\t"
"popl %%ebp\n\t"
"movl %%eax, (%%ebp)\n\t"
"movl %%ebx, 4(%%ebp)\n\t"
"movl %%ecx, 8(%%ebp)\n\t"
"movl %%edx, 12(%%ebp)\n\t"
"movl %%edi, 16(%%ebp)\n\t"
"movl %%esi, 20(%%ebp)\n\t"
"popa\n\t"
:
:"m" (bios_routine), "m" (preg400), "m" (buf)
:"%eax", "%ebx", "%ecx", "%edx", "%edi", "%esi", "%ebp"
);
local_irq_enable();
}
} /* line 615 */