* How to add source files in kernel
@ 2005-02-04 19:17 Rahul Jain
2005-02-04 20:22 ` linux-os
2005-02-04 20:26 ` Kronos
0 siblings, 2 replies; 4+ messages in thread
From: Rahul Jain @ 2005-02-04 19:17 UTC (permalink / raw)
To: Kernel Traffic Mailing List
Hi All,
I am trying to add 2 new files (a .h and a .c) in the kernel. I copied my
.h file in /include/linux and .c in /net/core. I then made the
following change to the Makefile in /net/core.
obj-y := sock.o skbuff.o iovec.o datagram.o scm.o split_helper.o
where split_helper.o is for the .c file that I am adding.
The kernel recompilation went without any problems. I wrote loadable
module programs that can access the functions defined in .c. When I try to
install these modules, they came back with the following error
/sbin/insmod x.o
x.o: unresolved symbol enqueue_sfi
x.o: unresolved symbol init_skbuff_list
x.o: unresolved symbol get_head_sfi
x.o: unresolved symbol search_sfi
x.o: unresolved symbol enqueue_skbuff_list
x.o: unresolved symbol init_head_sfi
x.o:
Hint: You are trying to load a module without a GPL compatible license
and it has unresolved symbols. Contact the module supplier for
assistance, only they can help you.
make: *** [install] Error 1
These functions are defined in the .c file and declared with the extern
keyword in the .h file. In my modules I am including the .h file.
Any suggestions on what I might be missing here ?
Thanks,
Rahul.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: How to add source files in kernel
2005-02-04 19:17 How to add source files in kernel Rahul Jain
@ 2005-02-04 20:22 ` linux-os
2005-02-04 20:26 ` Kronos
1 sibling, 0 replies; 4+ messages in thread
From: linux-os @ 2005-02-04 20:22 UTC (permalink / raw)
To: Rahul Jain; +Cc: Kernel Traffic Mailing List
On Fri, 4 Feb 2005, Rahul Jain wrote:
> Hi All,
>
> I am trying to add 2 new files (a .h and a .c) in the kernel. I copied my
> .h file in /include/linux and .c in /net/core. I then made the
> following change to the Makefile in /net/core.
>
> obj-y := sock.o skbuff.o iovec.o datagram.o scm.o split_helper.o
>
> where split_helper.o is for the .c file that I am adding.
>
> The kernel recompilation went without any problems. I wrote loadable
> module programs that can access the functions defined in .c. When I try to
> install these modules, they came back with the following error
>
> /sbin/insmod x.o
> x.o: unresolved symbol enqueue_sfi
> x.o: unresolved symbol init_skbuff_list
> x.o: unresolved symbol get_head_sfi
> x.o: unresolved symbol search_sfi
> x.o: unresolved symbol enqueue_skbuff_list
> x.o: unresolved symbol init_head_sfi
> x.o:
> Hint: You are trying to load a module without a GPL compatible license
> and it has unresolved symbols. Contact the module supplier for
> assistance, only they can help you.
>
> make: *** [install] Error 1
>
> These functions are defined in the .c file and declared with the extern
> keyword in the .h file. In my modules I am including the .h file.
>
> Any suggestions on what I might be missing here ?
>
> Thanks,
> Rahul.
MODULE_LICENSE("GPL");
Needs to be in one of your files. This is part of the
"New World Order".
Cheers,
Dick Johnson
Penguin : Linux version 2.6.10 on an i686 machine (5537.79 BogoMips).
Notice : All mail here is now cached for review by Dictator Bush.
98.36% of all statistics are fiction.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: How to add source files in kernel
2005-02-04 19:17 How to add source files in kernel Rahul Jain
2005-02-04 20:22 ` linux-os
@ 2005-02-04 20:26 ` Kronos
2005-02-07 17:53 ` Rahul Jain
1 sibling, 1 reply; 4+ messages in thread
From: Kronos @ 2005-02-04 20:26 UTC (permalink / raw)
To: linux-kernel; +Cc: Rahul Jain
Rahul Jain <rbj2@oak.njit.edu> ha scritto:
> The kernel recompilation went without any problems. I wrote loadable
> module programs that can access the functions defined in .c. When I try to
> install these modules, they came back with the following error
>
> /sbin/insmod x.o
> x.o: unresolved symbol enqueue_sfi
> x.o: unresolved symbol init_skbuff_list
> x.o: unresolved symbol get_head_sfi
> x.o: unresolved symbol search_sfi
> x.o: unresolved symbol enqueue_skbuff_list
> x.o: unresolved symbol init_head_sfi
> x.o:
> Hint: You are trying to load a module without a GPL compatible license
> and it has unresolved symbols. Contact the module supplier for
> assistance, only they can help you.
>
> make: *** [install] Error 1
You forgot the EXPORT for those symbols, add:
EXPORT_SYMBOL(symbol_name);
to .c file. Or you may have exported the symbols as GPL only
(EXPORT_SYMBOL_GPL) and the module which is not licensed under GPL
cannot see them.
Luca
--
Home: http://kronoz.cjb.net
La somma dell'intelligenza sulla terra e` una costante.
La popolazione e` in aumento.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: How to add source files in kernel
2005-02-04 20:26 ` Kronos
@ 2005-02-07 17:53 ` Rahul Jain
0 siblings, 0 replies; 4+ messages in thread
From: Rahul Jain @ 2005-02-07 17:53 UTC (permalink / raw)
To: Kronos; +Cc: Kernel Traffic Mailing List
On Fri, 4 Feb 2005, Kronos wrote:
>
>
>
> Rahul Jain <rbj2@oak.njit.edu> ha scritto:
> > The kernel recompilation went without any problems. I wrote loadable
> > module programs that can access the functions defined in .c. When I try to
> > install these modules, they came back with the following error
> >
> > /sbin/insmod x.o
> > x.o: unresolved symbol enqueue_sfi
> > x.o: unresolved symbol init_skbuff_list
> > x.o: unresolved symbol get_head_sfi
> > x.o: unresolved symbol search_sfi
> > x.o: unresolved symbol enqueue_skbuff_list
> > x.o: unresolved symbol init_head_sfi
> > x.o:
> > Hint: You are trying to load a module without a GPL compatible license
> > and it has unresolved symbols. Contact the module supplier for
> > assistance, only they can help you.
> >
> > make: *** [install] Error 1
>
> You forgot the EXPORT for those symbols, add:
>
> EXPORT_SYMBOL(symbol_name);
>
> to .c file. Or you may have exported the symbols as GPL only
> (EXPORT_SYMBOL_GPL) and the module which is not licensed under GPL
> cannot see them.
>
> Luca
> --
> Home: http://kronoz.cjb.net
> La somma dell'intelligenza sulla terra e` una costante.
> La popolazione e` in aumento.
>
I added EXPORT_SYMBOL(fn_name) for all the functions that I wanted to
access from my module. I also added MODULE_LICENSE("GPL") to the .c file.
And in the Makefile I added my_file.o to 'export_objs'. However I am still getting
the same error.
Any suggestions ? Are there any resources online which I can read.
Thanks,
Rahul.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2005-02-07 17:53 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-02-04 19:17 How to add source files in kernel Rahul Jain
2005-02-04 20:22 ` linux-os
2005-02-04 20:26 ` Kronos
2005-02-07 17:53 ` Rahul Jain
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®