I use a function pointer called broute_decision that is default set to NULL,
but can be initialized by another kernel module.
The definition of the function pointer is situated in net/bridge/br_input.c,
this file contains the right EXPORT_SYMBOL(broute_decision); line.
When compiling the kernel with the both the bridge and my code as a module, I
get the following error after "make modules_install":
depmod: *** Unresolved symbols in
using objdump gives:
#>objdump --disassemble -j __ksymtab net/bridge/br_input.o'
net/bridge/br_input.o: file format elf32-i386
Disassembly of section __ksymtab:
#>objdump --disassemble -j __ksymtab net/bridge/bridge.o'
net/bridge/bridge.o: file format elf32-i386
So, although br_input.o has the symbol in its table, bridge.o doesn't.
My difficulties come, AFAIK, from the fact that the bridge module is composed
out of multiple c-files, here is (an excerpt of) the bridge Makefile:
O_TARGET := bridge.o
# the follwing line is added by me
export-objs := br_input.o
obj-y := br.o br_device.o br_fdb.o br_forward.o br_if.o br_input.o \
br_ioctl.o br_notify.o br_stp.o br_stp_bpdu.o \
obj-m := $(O_TARGET)
When compiling the same kernel, but with the bridge and my code built into the
kernel (not as modules), everything compiles and it works fine.
I have a "solution" by defining broute_decision in net/core/dev.c and doing
the EXPORT_SYMBOL in net/netsyms.c. This works. But broute_decision is not
used in net/core/dev.c, so I would like the definition to be in
How do I get this to work?
Please CC me as I'm not subscribed to the list.
I can provide the compilable code (using net/core/dev.c) and the
non-compilable code (using net/bridge/br_input.c) if necessary.
-- cheers, Bart
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to email@example.com More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/