Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 6 Sep 2018 17:02:40 +0000
From:      freeuser <freebsduser@gmx.com>
To:        "Andrey V. Elsukov" <bu7cher@yandex.ru>, Eugene Grosbein <eugen@grosbein.net>, freebsd-hackers@freebsd.org
Subject:   Re: kernel module linking (general, ipfw table, netgraph)
Message-ID:  <241f0387-1451-c327-0340-0ce03c7ddcd0@gmx.com>
In-Reply-To: <039ee1d8-c357-c7ae-4049-2aa4ca91a5c4@yandex.ru>
References:  <ec108831-151a-1f4b-c5ae-4b6bc31383e3@gmx.com> <5B91163D.9030905@grosbein.net> <039ee1d8-c357-c7ae-4049-2aa4ca91a5c4@yandex.ru>

next in thread | previous in thread | raw e-mail | index | archive | help
On 06/09/2018 13:23, Andrey V. Elsukov wrote:
> On 06.09.2018 14:57, Eugene Grosbein wrote:
>>> I am building my module using /usr/src/sys/modules/netgraph/sample and
>>> /usr/src/sys/netgraph/ng_sample.* as templates. On the other hand,
>>> ng_socket
>>> uses kern_kldload, "sysctl -b kern.function_list | tr '\0' '\n' | grep
>>> kern_kldload"
>>> shows it and it works without any problems.
>>>
>>> Why is that? What have i not noticed that must be done?
>> Perhaps, this is KBI mismatch due to VIMAGE kernel option
>> that changes symbols like add_table_entry to V_add_table_entry
>> and your kernel module should be built WITH_VIMAGE defined too
>> to be loadable to such a kernel.
> I think VIMAGE only affects variables, but not functions.
> The problem is probably due to missing dependency. Look at ng_ipfw
> implementation. It depends from ipfw kernel module. Try add such
> dependency to your module.
>

Yes, by adding "MODULE_DEPEND.." fixed linking issues. Thank you very much!




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?241f0387-1451-c327-0340-0ce03c7ddcd0>