Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 6 Sep 2018 12:02:29 +0000
From:      freeuser <freebsduser@gmx.com>
To:        freebsd-hackers@freebsd.org
Subject:   kernel module linking (general, ipfw table, netgraph)
Message-ID:  <ec108831-151a-1f4b-c5ae-4b6bc31383e3@gmx.com>

next in thread | raw e-mail | index | archive | help
Hello,

I'm working on a netgraph kernel module that modifies ipfw table contents.
But i can not load the module, because
   kldload: an error occurred while loading the module. Please check 
dmesg(8)
   for more details.

dmesg informs:
..
link_elf_obj: symbol add_table_entry undefined
linker_load_file: Unsupported file type

add_table_entry is a function that modifies ipfw table, the thing is that i
have included the relevant header files, but i don't understand how 
should i
deal with linking. I assumed that this function will be available for 
module
since "sysctl -b kern.function_list | tr '\0' '\n' | grep add_table" shows
it.

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?

Thank you,
freeuser



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?ec108831-151a-1f4b-c5ae-4b6bc31383e3>