Subject: pf as a module for XEN3_DOM0
To: None <port-xen@NetBSD.org>
From: Juraj Hercek <nbsd@hck.sk>
List: port-xen
Date: 07/17/2006 17:05:33
Hi,

I can't modload pf.o into running xen3 dom0 nbsd kernel (v. 3.99.22). 
These are the symptoms:

$  sudo modload -vd pf.o
ld -R /dev/ksyms -e pf_lkmentry -o pf -Ttext 0x0 pf.o
pf.o: In function `pf_init_threshold':
: undefined reference to `time_second'
pf.o: In function `pf_add_threshold':
: undefined reference to `time_second'
pf.o: In function `pf_state_expires':
: undefined reference to `time_second'
pf.o: In function `pf_src_tree_remove_state':
: undefined reference to `time_second'
pf.o: In function `pf_src_tree_remove_state':
: undefined reference to `time_second'
pf.o:: more undefined references to `time_second' follow
modload: can't prelink `pf.o' creating `pf'

The time_second symbol is defined in kern_tc.c, but even if this file is 
compiled, no symbols gets to the resulting kernel file. The nm command 
on kern_tc.o gives nothing - no symbols.

If I compile pf into kernel, everything's ok, but I'd like to use old 
altq as well and it's possible only with pf as module in -current HEAD 
branch.

What is the proper solution of this problem and what are the hacks (if any)?

Thanks.

--
Juraj