Subject: Problem with loading LKMs
To: None <current-users@netbsd.org>
From: Bang Jun-Young <bjy@mogua.org>
List: current-users
Date: 07/04/2001 22:58:47
Hi,

I have problems with loading kernel modules. When I tried to load 
modules I got:

# modload -d compat_linux.o
ld -R /netbsd -e compat_linux_lkmentry -o compat_linux -Ttext 0x0 compat_linux.o
compat_linux.o: In function `linux_sys_ioctl':
compat_linux.o(.text+0x1b98): undefined reference to `oss_ioctl_mixer'
compat_linux.o(.text+0x1ba8): undefined reference to `oss_ioctl_audio'
compat_linux.o(.text+0x1c32): undefined reference to `oss_ioctl_sequencer'
modload: can't prelink `compat_linux.o' creating `compat_linux'
# modload -d exec_linux_elf.o
ld -R /netbsd -e exec_linux_elf_lkmentry -o exec_linux_elf -Ttext 0x0 exec_linux_elf.o
.text: addr = 0x0 size = 0x7bb align = 0x4
.rodata: addr = 0x7c0 size = 0xcf align = 0x20
.data: addr = 0x18a0 size = 0x38 align = 0x20
.data section forced to offset 0x8a0 (was 0x18a0)
.bss: addr = 0x18d8 size = 0 align = 0x4
ld -R /netbsd -e exec_linux_elf_lkmentry -o exec_linux_elf -Ttext 0xcaf22000 -Tdata 0xcaf228a0 exec_linux_elf.o
loading `.text': addr = 0xcaf22000, size = 0x7bb
loading `.rodata': addr = 0xcaf227c0, size = 0xcf
loading `.data': addr = 0xcaf228a0, size = 0x38
loading `.bss': addr = 0xcaf228d8, size = 0
modentry = 0xcaf22000
modload: error initializing module: No such file or directory
# modload -d exec_pecoff.o
ld -R /netbsd -e exec_pecoff_lkmentry -o exec_pecoff -Ttext 0x0 exec_pecoff.o
.text: addr = 0x0 size = 0xb20 align = 0x4
.rodata: addr = 0xb20 size = 0x2f align = 0x1
.data: addr = 0x1b60 size = 0x38 align = 0x20
.data section forced to offset 0xb60 (was 0x1b60)
.bss: addr = 0x1b98 size = 0 align = 0x4
ld -R /netbsd -e exec_pecoff_lkmentry -o exec_pecoff -Ttext 0xcaf22000 -Tdata 0xcaf22b60 exec_pecoff.o
loading `.text': addr = 0xcaf22000, size = 0xb20
loading `.rodata': addr = 0xcaf22b20, size = 0x2f
loading `.data': addr = 0xcaf22b60, size = 0x38
loading `.bss': addr = 0xcaf22b98, size = 0
modentry = 0xcaf22000
modload: error initializing module: No such file or directory

The last one seen above is PECOFF kernel module I'm working
on. I expected a successful result with it, but I couldn't even get 
existing modules loaded. :( It would be helpful if I compared -current
with 1.5, but none of my machines is currently running 1.5.

Any help would be appreciated,

Jun-Young

-- 
Bang Jun-Young <bjy@mogua.org>