Subject: Problems with LKMs in -current
To: None <>
From: Juraj Hercek <>
List: tech-kern
Date: 07/16/2006 18:24:50

I've a problem loading modules in '-current' (3.99.22) kernel on i386. 
This is the main problem:

# modload 
/dev/ksyms: file not recognized: File format not recognized
modload: can't prelink `pf.o' creating `pf'

A way how to "solve" this is this:

# modload -A /netbsd pf.o
Module loaded as ID 0

However I don't like the "-A" trick. I've experimenting a while and it 
seems that /dev/ksyms is really in bad shape:

# cat /dev/ksyms > 
# file /tmp/ksyms
/tmp/ksyms: ELF 32-bit invalid byte order (SYSV), corrupted section 
header size

This most probably causes linker to fail while using symbols from 
/dev/ksyms. Any idea what could be wrong? I use grub (+ MULTIBOOT kernel 
option) to load the kernel if that matters (I think it should not).