I have checked the email and I am facing the same kind of problem. But it is with the global variable. But in this email I could not understand the solution of resolving the problem of undefine!..
I have used EXPORT_SYMBOL() to export the global variable. I have also checked System. map and variable is there...I have checked Module.symvers but the variable is not missing. I was not able to resolve that problem. Any suggestions what I have done wrong or what is missing ...?
________________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]#
__________Error Ends ______________
the code is as under ..
For System call
#include<linux/linkage.h>
#include<linux/kernel.h>
int global_fd = 0;
EXPORT_SYMBOL(global_fd);
asmlinkage int sys_mycall(int fd)
{
global_fd = fd;
return fd;
}
For tcp_ipv6.c
<Include files ............>
extern int global_fd ;
...
...
..
static int tcp_v6_rcv(struct sk_buff **pskb)
{
printk("\n%d done\n",global_fd);
..
...
I have used EXPORT_SYMBOL() to export the global variable. I have also checked System. map and variable is there...I have checked Module.symvers but the variable is not missing. I was not able to resolve that problem. Any suggestions what I have done wrong or what is missing ...?
________________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]#
__________Error Ends ______________
the code is as under ..
For System call
#include<linux/linkage.h>
#include<linux/kernel.h>
int global_fd = 0;
EXPORT_SYMBOL(global_fd);
asmlinkage int sys_mycall(int fd)
{
global_fd = fd;
return fd;
}
For tcp_ipv6.c
<Include files ............>
extern int global_fd ;
...
...
..
static int tcp_v6_rcv(struct sk_buff **pskb)
{
printk("\n%d done\n",global_fd);
..
...
----- Original Message ----
From: suman adak <gnusuman@xxxxxxxxx>
To: Irfan Ahmed <ahm_irf@xxxxxxxxx>
Cc: sandeep lahane <sandeep.lahane@xxxxxxxxx>; kernelnewbies@xxxxxxxxxxxx
Sent: Wednesday, May 23, 2007 11:22:01 AM
Subject: Re: Command to check the list of export symbols of running kernel
From: suman adak <gnusuman@xxxxxxxxx>
To: Irfan Ahmed <ahm_irf@xxxxxxxxx>
Cc: sandeep lahane <sandeep.lahane@xxxxxxxxx>; kernelnewbies@xxxxxxxxxxxx
Sent: Wednesday, May 23, 2007 11:22:01 AM
Subject: Re: Command to check the list of export symbols of running kernel
Hi irfan,
On 5/23/07, sandeep lahane <sandeep.lahane@xxxxxxxxx> wrote:
> On 5/23/07, Irfan Ahmed <ahm_irf@xxxxxxxxx> wrote:
> >
> > Hi,
> >
> > I am using Fedora Linux Kernel 2.6.18.2 .. Is there a way or command through
> > which I can check the list of exported symbols of the running kernel.
> > The symbols that are exported to kernel module ..More specifically where
> > EXPORT_SYMBOL macro is used to export symbols
> cat /proc/kallsyms or ksyms etc
> --
May be this command will not help you if you don't use stock kernel in
fedora box.
I mean if you have fedora-kernel then you have to apply a patch .look
at may mail in kernelnewbies list.
i am just forwarding this mail to you and list..and also archive
http://mail.nl.linux.org/kernelnewbies/2006-08/msg00456.html
look at previous thread also.
--
Suman Adak
Tata Consultancy Services
mail to: suman.adak@xxxxxxx
www.tcs.com
On 5/23/07, sandeep lahane <sandeep.lahane@xxxxxxxxx> wrote:
> On 5/23/07, Irfan Ahmed <ahm_irf@xxxxxxxxx> wrote:
> >
> > Hi,
> >
> > I am using Fedora Linux Kernel 2.6.18.2 .. Is there a way or command through
> > which I can check the list of exported symbols of the running kernel.
> > The symbols that are exported to kernel module ..More specifically where
> > EXPORT_SYMBOL macro is used to export symbols
> cat /proc/kallsyms or ksyms etc
> --
May be this command will not help you if you don't use stock kernel in
fedora box.
I mean if you have fedora-kernel then you have to apply a patch .look
at may mail in kernelnewbies list.
i am just forwarding this mail to you and list..and also archive
http://mail.nl.linux.org/kernelnewbies/2006-08/msg00456.html
look at previous thread also.
--
Suman Adak
Tata Consultancy Services
mail to: suman.adak@xxxxxxx
www.tcs.com
Send instant messages to your online friends http://uk.messenger.yahoo.com