Hi All,
I was trying to use EXPORT_SYMBOL()in my module
and occured with blow error
ash_sample1.c:30: parse error before "this_object_must_be_defined_as_export_objs_in_the_Makefile"
ash_sample1.c:30: warning: type defaults to `int' in declaration of `this_object_must_be_defined_as_export_objs_in_the_Makefile'
ash_sample1.c:30: warning: data definition has no type or storage class
This module code
Code:
#include <linux/init.h>
#include <linux/module.h>
#include <linux/kernel.h>
int ash_symbol(void);
static int __init hello_init(void)
{
printk(KERN_ALERT " Module successfully inserted\n");
return 0;
}
static void __exit hello_exit(void)
{
printk(KERN_ALERT " Module removed ");
;
}
int ash_symbol(void);
{
printk(KERN_ALERT "export_symbol function\n");
return 0;
}
module_init(hello_init);
module_exit(hello_exit);
MODULE_LICENSE("GPL");
MODULE_DESCRIPTION(" sample module");
MODULE_AUTHOR("Ash");
EXPORT_SYMBOL_GPL(ash_symbol);
Help me to remove this error and let me know how to use same symbol in other module.
Any links on EXPORT_SYMBOL()usage is appreciated.
Thanks ...