LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat
User Name
Password
Red Hat This forum is for the discussion of Red Hat Linux.

Notices

Reply
 
LinkBack Search this Thread
Old 08-05-2006, 01:29 PM   #1
sd_nitdgp
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__

#include<linux/kernel.h>
#include<linux/module.h>

/*#if CONFIG_MODVERSIONS == 1
#define MODVERSIONS
#include<linux/modversions.h>
#endif*/

#include<linux/sys.h>
#include<sys/syscall.h>
//#include<sys/time.h>
/***for tracing user and process******/
//#include<linux/sched.h>

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();
//get_time_of_day(x,y);
//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?
 
  


Reply


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
Trackbacks are Off
Pingbacks are On
Refbacks are 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 07:46 AM
Not Finding pcibios_* functions in RHEL4 (2.6.9)..module compilation problem kumarnine Programming 1 04-13-2006 08:23 AM
Kernel Module compilation and running imransadat Programming 3 03-04-2005 06:56 AM
kernel module compilation zbrox Linux - Software 1 01-28-2004 03:31 PM


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

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration