Re: Call kernel function from module

Kirill Ratkin (kratkin@egartech.com)
Wed, 31 Oct 2001 14:46:43 +0300


Michael Rozhavsky wrote:
>
> [snip]
> >
> > Hi! Could somebody help me? I added several functions (not sys calls) to
> > kernel as hardcoded part. Then I write modules which will be call these
> > functions. But when I load module insmod says me 'can't resolve symbol
> > my_func_name'.
> > I exported all my functions in netsyms.c file. Do you know how I can see
> > my function?
>
> use EXPORT_SYMBOL macro from include/module.h
Yes. I added it in netsyms.c and I see all my functions in System.map
file. (into ksyms too)

#ifdef CONFIG_BATON
#include <linux/baton.h>
EXPORT_SYMBOL(baton_init);
EXPORT_SYMBOL(baton_register_hook);
EXPORT_SYMBOL(baton_unregister_hook);
#endif

>
> >
> > Regards,
> > Niktar.
> > -
> > To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> > the body of a message to majordomo@vger.kernel.org
> > More majordomo info at http://vger.kernel.org/majordomo-info.html
> > Please read the FAQ at http://www.tux.org/lkml/
> Best regards.
>
> --
> Michael Rozhavsky Tel: +972-4-9936248
> mrozhavsky@opticalaccess.com Fax: +972-4-9890564
> Optical Access
> Senior Software Engineer www.opticalaccess.com
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/