Review your favorite Linux distribution.
Go Back > Forums > Non-*NIX Forums > Programming
User Name
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.


  Search this Thread
Old 06-15-2005, 04:06 AM   #1
LQ Newbie
Registered: Jun 2005
Location: wuhan china
Posts: 2

Rep: Reputation: 0
how to add my own system call in RedHat linux9.0(2.4.7-20kernel)

I am a beginner of Linux kernel development.
reecntly, I have add some new system call in RedHad Linux7.0( kernel), and they do work! I was very pleased.
but today, I install Redhat 9.0. the system call crash!

my job is :

1 firstly, I add my system call num in unistd.h

2 secondly, I write function in sys.c file under kernel directory
asmlinkage int sys_mycall(struct pt_regs regs){

#define a regs.ecx
#define b regs.ebx
#define c regs.edx

return 0;

3 in program:

_syscall3(int, mycall, int, a, int, b, int, c)



ret = mycall(a, b, c);

then I complied and linked, the error happens in link stage.
the message is:" reference to undefined erron in mycall..."

what is wrong? help, please! thank you!


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
add new system call linux_lover2005 Programming 2 10-14-2006 01:37 AM
How to install modem on Redhat Linux9? piggysmile Linux - Newbie 17 02-22-2005 12:50 AM
Redhat linux9.0:System hangs,if gives init 3 or init 4 Sailaja Reddy Linux - Newbie 4 09-16-2004 03:19 AM
RedHat Linux9-Going Backward ? Dineth Red Hat 2 01-04-2004 01:37 AM
Error when add a new system call in RH9.0. GreenStar Linux - Newbie 2 11-01-2003 01:52 PM > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 07:13 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
Open Source Consulting | Domain Registration