Need help in exporting Functions to kernel(modified question)

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

 



Hi all, 
         
            How can i export my own function written in C file added to kernel which can be used by my own module mod1.c. mod1.c is a kernel modules file that is compiled with other modules in make modules command. but i am getting some warnings how can i remove it?

mod1.c: In function `hook_func1':
> mod1.c:29: warning: implicit declaration of function `funmy'
> mod1.c:29: warning: assignment makes pointer from integer without a cast

where funmy is function defined in finalmy.c which is also get compiled.
when i did make make install get following error
depmod: *** Unresolved symbols in /lib/modules/2.4.24/kernel/net/ipv4/mod1.o
depmod:        funmy


Also when finalmy.c is also get compiled
finalmy1.c:31: warning: type defaults to `int' in declaration of `EXPORT_SYMBOL'
finalmy1.c:31: warning: parameter names (without types) in function declaration
finalmy1.c:31: warning: data definition has no type or storage class


snippet of warning part of my module mod1.c is
          line 29:              text=funmd(mystruct->data);
where variable data is unsigned char *data;

In finalmy.c
unsigned char *funmy(unsigned char *data)
{
.....
........
return (str1);
}
EXPORT_SYMBOL(funmy);

regards,
parag.




[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