netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* help needed with EXPORT_SYMBOL
@ 2010-08-21  6:57 Aijaz Baig
  2010-08-21  9:23 ` Jan Engelhardt
  2010-08-23  5:14 ` Aijaz Baig
  0 siblings, 2 replies; 14+ messages in thread
From: Aijaz Baig @ 2010-08-21  6:57 UTC (permalink / raw)
  To: netfilter-devel; +Cc: linux-kernel

Hello,

Ive been trying to EXPORT a SYMBOL from a netfilter module (actually a
hook) to the KERNEL. Various modules seem to export various symbols to
the kernel (or so it seems), an example being x_tables which exports a
whole lot of functions like xt_register_target and so on and all other
netfilter modules which use these functions dont seem to have any
problems.

So why is it that when my netfilter module is exporting something to the
kernel and im tryin to use it from within a core kernel file, the
compiler flags a 'undefined reference to' error?

I googled and came to the conclusion from the kernelnewbies mailing list
that using kallsyms_lookup() seems to be the answer or is it?
So, if I do intend to use kallsyms_lookup how do I use it? There aren't
so many instances of it being used it seems.
 
Ive seen it being used in dev/core.c like so:
symname = kallsyms_lookup((unsigned long)sym, &symsize,&offset,&modname,
namebuf);

I am basically trying to call a function that MY module EXPORTs inside
one of the core linux routines. This would also mean that my netfilter
module must be compiled (and linked also maybe?..not so sound with link
time stuff) before the address becomes visible so that kallsyms_lookup
can find it. So do I really shd be using it and if so, how?

Any input is appreciated.

Regards,
Aijaz Baig.




^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2010-08-25 15:38 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-08-21  6:57 help needed with EXPORT_SYMBOL Aijaz Baig
2010-08-21  9:23 ` Jan Engelhardt
2010-08-23  5:14 ` Aijaz Baig
2010-08-23 11:48   ` Brian Gerst
2010-08-23 13:17     ` Peter Zijlstra
2010-08-23 13:32       ` Jan Engelhardt
2010-08-23 13:43         ` Peter Zijlstra
2010-08-23 13:44       ` Brian Gerst
2010-08-23 14:05         ` Peter Zijlstra
     [not found]           ` <AANLkTimQDV74kcM_84QySMKmdf-XxFOhqp48cQdQNN4s@mail.gmail.com>
     [not found]             ` <AANLkTinRyoHcSmmHv9tZ36X4wxVVCKGLDwGiZUTPPn+z@mail.gmail.com>
2010-08-24  4:44               ` Aijaz Baig
     [not found]                 ` <AANLkTi=cj+qCFxeT5hq0-x-XqSUCbcqQRAwmQ9h+cOxy@mail.gmail.com>
     [not found]                   ` <AANLkTim9nvJR0K6xJc2kHGCeoMzFLzSxR8Avx59jsEbf@mail.gmail.com>
2010-08-25  9:27                     ` Fwd: " Aijaz Baig
2010-08-25 10:06                       ` Jan Engelhardt
2010-08-25 10:23                       ` Peter Zijlstra
2010-08-25 15:37                       ` Randy Dunlap

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).