adding system call in linux
Hi,
i am working on implementation of system call, where i tried to implement a system call in which i made the following changes in the code: 1. In file /usr/src/linux/fs a) Makefile : I added O_OBJS += myservice.o b) myservice.c wrote a function : #include <linux/myservice.h> asmlinkage int sys_myservice(unsigned int arg1) { printk("/n i m in my service"); return(1); } 2. In file /usr/src/linux/include/asm unistd.h .long SYMBOL_NAME(sys_myservice) /*191*/ 3. In file /usr/src/linux/arch/i386/kernel entry.S #define __NR_myservice 191 4. In file /usr/src/linux/include/linux myservice.h #ifndef __LINUX_MYSERVICE_H #define __LINUX_MYSERVICE_H #include <linux/unistd.h> #include <linux/linkage.h> #include<linux/kernel.h> _syscall2(int, myservice, int, arg1); #endif after compiling and rebooting i got the following errors during rebooting 1. system logger --- failed 2. NFS lockd ------ failed also when i tried to run this system call, i got the following error: /tmp/ccMK9qPM.o :In function 'main': /tmp/ccMK9qPM.o(text+0xc):undefined reference to 'secclose' collect2 :Id returned 1 exit status. I saw that you are also working on system calls . Might be we can be of help to each other. We can discuss the particular problem. regards and thanx in advance Udayan |
Hi udayan,
I've just read the e-mail you've sent to me, but I don't have any solution to your problem ! In fact, I'm not a "kernel hacker" :-) Regards Gluon |
All times are GMT -5. The time now is 08:28 AM. |