LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Password
Linux - Kernel This forum is for all discussion relating to the Linux kernel.

Notices


Reply
  Search this Thread
Old 07-25-2014, 02:18 AM   #1
Taraka Praveen
LQ Newbie
 
Registered: Jul 2014
Posts: 1

Rep: Reputation: Disabled
Error while compiling a newly added system call


:/usr/src/linux-2.6.31.5-0.1/arch/x86/kernel # vi syscall_table_32.S
.long sys_hello

:/usr/src/linux-2.6.31.5-0.1/include/asm # vi unistd_32.h
#define __NR_hello 337

:/usr/src/linux-2.6.31.5-0.1/include/asm # vi unistd_64.h
#define __NR_hello 299
__SYSCALL(__NR_hello, sys_hello)

:/usr/src/linux-2.6.31.5-0.1/include/linux # vi syscalls.h
asmlinkage long sys_hello(int i,int j);

:/usr/src/linux-2.6.31.5-0.1/kernel# vi hello.c
#include<linux/linkage.h>
asmlinkage long sys_hello(int i,int j)
{
return i+j;
}
:/usr/src/linux-2.6.31.5-0.1/kernel#vi Makefile
..........
obj-y += hello.o

obj-y += groups.o
.............

:/usr/src/linux-2.6.31.5-0.1 # make
....
....

GEN .version
CHK include/linux/compile.h
UPD include/linux/compile.h
CC init/version.o
LD init/built-in.o
LD .tmp_vmlinux1
arch/x86/built-in.o: In function `sys_call_table':
(.rodata+0x754): undefined reference to `sys_real_time_rr'
make: *** [.tmp_vmlinux1] Error 1


After few lines are compiled,the above error is generated..
Please help me to know where the changes should be made and how to resolve it.?

Last edited by Taraka Praveen; 07-25-2014 at 02:19 AM.
 
Old 07-26-2014, 03:53 PM   #2
smallpond
Senior Member
 
Registered: Feb 2011
Location: Massachusetts, USA
Distribution: Fedora
Posts: 4,140

Rep: Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263
Did your kernel compile correctly before you made changes to it?
 
  


Reply



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
how to view the new added system call? aicrop Programming 2 08-30-2010 01:54 PM
[SOLVED] I added a system call in the Linux kernel, but a problem occured. corone Linux - Kernel 2 08-26-2009 05:22 AM
can i test new system call before compiling kernel?????? brian1125 Programming 2 04-03-2009 07:43 AM
how can i mount newly added H.D using SuSe 9.0 elbrens Linux - Software 3 08-14-2007 01:51 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel

All times are GMT -5. The time now is 11:48 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration