Current-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Removing debugging symbols from kernel modules



Hi,

I recently started to use kernel modules to ease developpement on my
amd64 machine. For now i only used compat linux and linux32 ones,
which worked flawlessly (since recent build fixes). Now, i'm trying to
use all the remaining compat modules. But ...

I can load a few modules (mostly 3 or 4), but then all other fail with
ENOMEM. The problem is that kernel modules are build, in my case, with
debugging support just like the whole userland; and quickly eat all
the reserved kernel space for module loading.

/etc/mk.conf:
MKDEBUG=        yes
.if !defined(KERNEL_BUILD) && MKDEBUG != no
COPTS+=         -g
STRIPFLAG=      -S -d
.endif

While i can test for defined(KMOD) to disable debugging, it could be
convenient to keep it here just in case and only install a stripped
version ...

I then tested to add ${STRIPFLAG} to the module installation command
(from share/mk/bsd.kmodule.mk) which solved the problem; but i wonder
if this safe enough or we should use the kernel mecanism instead
(SYSTEM_LD_TAIL_DEBUG from sys/conf/Makefile.kern.inc) ?

Thanks.

-- 
Nicolas Joly

Biological Software and Databanks.
Institut Pasteur, Paris.


Home | Main Index | Thread Index | Old Index