LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Password
Linux - Kernel This forum is for all discussion relating to the Linux kernel.

Notices


Reply
  Search this Thread
Old 01-11-2008, 02:26 AM   #1
ashok449
Member
 
Registered: Sep 2007
Location: noida
Distribution: suse
Posts: 63

Rep: Reputation: 16
EXPORT_SYMBOL--error


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 ...
 
Old 01-11-2008, 07:01 AM   #2
ashok449
Member
 
Registered: Sep 2007
Location: noida
Distribution: suse
Posts: 63

Original Poster
Rep: Reputation: 16
Any links on adding kernel symbols . Please let me know
 
Old 01-19-2008, 12:58 AM   #3
ashok449
Member
 
Registered: Sep 2007
Location: noida
Distribution: suse
Posts: 63

Original Poster
Rep: Reputation: 16
Help me on this issue.....

Provide some links on how to add kernel symbols


Thanks ...
 
Old 01-22-2008, 11:23 PM   #4
ashok449
Member
 
Registered: Sep 2007
Location: noida
Distribution: suse
Posts: 63

Original Poster
Rep: Reputation: 16
I successfully inserted symbol by adding #define EXPORT_SYMTAB

EXPORT_SYMBOL_GPL(ash_symbol);

If I wanna use the function ash_symbol() in other module how should I call that symbol.

Help me...
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Help!! Compilation error using EXPORT_SYMBOL in fedora Core4 ajijuni Fedora 0 07-13-2007 04:39 PM
export_symbol shrishailnk Linux - Networking 0 04-26-2006 09:51 AM
Makefile related ( EXPORT_SYMBOL) shrishailnk Linux - Networking 0 04-25-2006 09:35 PM
EXPORT_SYMBOL (linux) nooch Programming 2 03-03-2005 08:35 AM
what does EXPORT_SYMBOL do? h/w Programming 2 05-17-2004 09:35 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel

All times are GMT -5. The time now is 03:59 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration