Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - Distributions > Red Hat
User Name
Red Hat This forum is for the discussion of Red Hat Linux.


  Search this Thread
Old 08-05-2006, 02:29 PM   #1
LQ Newbie
Registered: Aug 2006
Posts: 1

Rep: Reputation: 0
Question kernel module compilation error in RHEL4.0

i received the following error compiling my new kernel module in RHEl 4:

my code follows:

//#define MODULE
//#define __KERNEL__



/***for tracing user and process******/

extern void *sys_call_table[NR_syscalls];
int(*orig_sys_call)(const char *, int, int);
asmlinkage int(*get_uid)();
asmlinkage int(*get_time_of_day)(struct timeval *, struct timezone *);
/****fn trapping open*********/
int my_sys_open(const char*filename, int flags, int mode)
int i;
//struct timeval *x;
//struct timezone *y;
//time_t secs;
//i = get_uid();
//secs = x->tv_sec;
printk("process tries to call the system call open at time ");
return orig_sys_call(filename, flags, mode);
/******appending our actions to the origcall*******/
int init_modle()
orig_sys_call = sys_call_table[__NR_open];
sys_call_table[__NR_open] = my_sys_open;
get_uid = sys_call_table[__NR_getuid];
get_time_of_day = sys_call_table[__NR_gettimeofday];
return 0;

void cleanup_module()
sys_call_table[__NR_open] = orig_sys_call;

after compilation, i get the error"undefined symbol sys_call_table"

is this a prolem for 2.6 kernels?
any solutions please?


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
2.4.32 kernel compilation problem on RHEL4 b123coder Red Hat 9 10-19-2006 08:46 AM
Not Finding pcibios_* functions in RHEL4 (2.6.9)..module compilation problem kumarnine Programming 1 04-13-2006 09:23 AM
Kernel Module compilation and running imransadat Programming 3 03-04-2005 07:56 AM
kernel module compilation zbrox Linux - Software 1 01-28-2004 04:31 PM > Forums > Linux Forums > Linux - Distributions > Red Hat

All times are GMT -5. The time now is 12:24 AM.

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