Re: Kernel Compilation problem - Partially Solved

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



* Narasimhamurthy Giridhar (giridhar@cs.clemson.edu) wrote:
> 
> But user pgm does not see the new call.
> Error: at line 5,undefined reference to __NR_mycall and some other error
> regarding
> errno.
> 
> The user pgm is :
> 
> #include<stdio.h>
> #include<sys/time.h>

before you include unistd.h, you need to manually #define __NR_mycall 191

> #include<asm/unistd.h>
           ^^^
#include <linux/unistd.h> here, this ought to fix the errno problem.

> _syscall1(int, mycall, struct timeval*,t);
> 
> main() {
> int ret;
> struct timeval t;
> ret = mycall(&t);
> }
> 
> In /usr/src/linux/include/asm/unistd.h, i added
> #define __NR_mycall 191

are you sure you want 191, it's likely alread taken (unless your kernel
is really old)?

> In /usr/src/linux/arch/i386/kernel/entry.S, i added
> 
> .long SYMBOL_NAME(sys_maycall)

make sure this is in slot 191 in the table.

cheers,
-chris
--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux