Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
when I run a small program after building a new kernel ( after adding my own new system call), I am getting this error..
===============================
/tmp/cceoGVXN.o(.text+0x23):In function 'mysystemcall'
:undefined reference to 'errno'
collect2?:ld returned 1 exit status
I followed all steps of kernel compilation (for linux-2.4.24)
In a new kernel, I am running my sample program to check my new implemented system call . But compilation is going smoothly..output is -1...it means that , function is not implemented?
after I am checking using this cmd..
strace ./a.out( executable of user mode code)
function not implemented..-1
code is...
#include<linux/myroutine.h> // myroutine is my new system call program.
main(){
int sum=0;
sum=myroutine(10,10);
printf("%d",sum);
}
Hi,
I assume from that link you have implemented
1)kernel space header for new syscall
2)Actual syscall implementaion
3)User spcae header
4)user space sample prog to test syscall
5)then modify entry.S
6)modify unistd.h in kernel source as well as user space
Have you done all these things
i thing you have not done user spcae modification to
/usr/include/asm-i386/unistd.h
hi,
it looks ok. i am still not able to determine what can be the problem? but somehow syscall is not getting called from user spcae program. check if you have forgotten to modify Makefile===>
Quote:
You can place the system call file in any directory,only thing you have to do is add a line makefile corresponding to that directory,such that the myroutine file gets compiled. This is done by adding the line O_OBJS += myoroutine.o in the make file .
I did all the modifications ,but when I run the sample program which I wrote for my own system call , gives -1 . This means system call is not implemeted?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.