mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* EXPORT_SYMBOL problem, in networking code
@ 2002-07-28 13:11 Bart De Schuymer
  0 siblings, 0 replies; only message in thread
From: Bart De Schuymer @ 2002-07-28 13:11 UTC (permalink / raw)
  To: linux-kernel

Hello,

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 
/lib/modules/2.4.18/kernel/net/bridge/netfilter/ebtable_broute.o
depmod:	broute_decision_Rsmp_b3a20e56

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:
00000000 <__ksymtab_broute_decision_Rsmp_b3a20e56

#>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 \
                        br_stp_if.o br_stp_timer.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 
net/bridge/br_input.c.

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


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2002-07-28 13:07 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-07-28 13:11 EXPORT_SYMBOL problem, in networking code Bart De Schuymer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®