Hi,
I am need to use one global variable in two files.
One is ~/net/ipv6/tcp_ipv6.c where I have defined the global variable as extern int global_fd;
Second is my custom system call code. Its code is as follows
__________
#include<linux/linkage.h>
#include<linux/kernel.h>
int global_fd;
asmlinkage int sys_mycall(int fd)
{
global_fd = fd;
return fd;
}
___________
Now I am still getting the follwing error
___________________________
CHK include/linux/version.h
CHK include/linux/utsrelease.h
Building modules, stage 2.
MODPOST
WARNING: drivers/atm/he.o - Section mismatch: reference to .init.text: from .text between 'he_start' (at offset 0x2074) and 'he_service_tbrq'
WARNING: "global_fd" [net/ipv6/ipv6.ko] undefined!
WARNING: "sys_write" [net/ipv6/ipv6.ko] undefined!
[root@localhost linux-2.6.18.2]#
________________
Anther thing that I want to ask about sys_write . Can I use it in kernel code other than kernel module. and how can I solve the undefined problem of sys_write even I have also added the syscalls.h header file.
Regards,
Irfan
I am need to use one global variable in two files.
One is ~/net/ipv6/tcp_ipv6.c where I have defined the global variable as extern int global_fd;
Second is my custom system call code. Its code is as follows
__________
#include<linux/linkage.h>
#include<linux/kernel.h>
int global_fd;
asmlinkage int sys_mycall(int fd)
{
global_fd = fd;
return fd;
}
___________
Now I am still getting the follwing error
___________________________
CHK include/linux/version.h
CHK include/linux/utsrelease.h
Building modules, stage 2.
MODPOST
WARNING: drivers/atm/he.o - Section mismatch: reference to .init.text: from .text between 'he_start' (at offset 0x2074) and 'he_service_tbrq'
WARNING: "global_fd" [net/ipv6/ipv6.ko] undefined!
WARNING: "sys_write" [net/ipv6/ipv6.ko] undefined!
[root@localhost linux-2.6.18.2]#
________________
Anther thing that I want to ask about sys_write . Can I use it in kernel code other than kernel module. and how can I solve the undefined problem of sys_write even I have also added the syscalls.h header file.
Regards,
Irfan
Send instant messages to your online friends http://uk.messenger.yahoo.com