LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 12-15-2004, 01:50 AM   #1
b123coder
Member
 
Registered: Nov 2004
Location: india
Distribution: Fedora core 1
Posts: 67

Rep: Reputation: 15
Need help in exporting Functions to kernel


How can i export my own function written in C file added to kernel which can be used by my own module mod1.c. mod1.c is a kernel modules file that is compiled with other modules in make modules command. but i am getting some warnings how can i remove it?

mod1.c: In function `hook_func1':
> mod1.c:29: warning: implicit declaration of function `funmy'
> mod1.c:29: warning: assignment makes pointer from integer without a cast

where funmy is function defined in finalmy.c which is also get compiled.
when i did make make install get following error
depmod: *** Unresolved symbols in /lib/modules/2.4.24/kernel/net/ipv4/mod1.o
depmod: funmy


Also when finalmy.c is also get compiled
finalmy1.c:31: warning: type defaults to `int' in declaration of `EXPORT_SYMBOL'
finalmy1.c:31: warning: parameter names (without types) in function declaration
finalmy1.c:31: warning: data definition has no type or storage class


snippet of warning part of my module mod1.c is
line 29: text=funmy(mystruct->data);
where variable data is unsigned char *data;

In finalmy.c
unsigned char *funmy(unsigned char *data)
{
.....
........
return (str1);
}
EXPORT_SYMBOL(funmy;

Last edited by b123coder; 12-15-2004 at 02:52 AM.
 
  


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
Where to get the kernel functions? okeyla Linux - Newbie 1 05-17-2005 05:05 AM
kernel functions sunfzam Linux - Software 14 04-10-2005 12:27 AM
kernel functions sunfzam Linux - Distributions 3 04-05-2005 02:52 PM
exporting the settings of a binary kernel aalawi Linux - General 1 10-15-2004 05:53 PM
how to use c functions in linux kernel mode pwangee Linux - General 5 07-12-2004 10:21 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 10:51 PM.

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