Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S263291AbVBDUol (ORCPT ); Fri, 4 Feb 2005 15:44:41 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S264408AbVBDUf0 (ORCPT ); Fri, 4 Feb 2005 15:35:26 -0500 Received: from alog0095.analogic.com ([208.224.220.110]:1408 "EHLO chaos.analogic.com") by vger.kernel.org with ESMTP id S264629AbVBDUWY (ORCPT ); Fri, 4 Feb 2005 15:22:24 -0500 Date: Fri, 4 Feb 2005 15:22:25 -0500 (EST) From: linux-os Reply-To: linux-os@analogic.com To: Rahul Jain cc: Kernel Traffic Mailing List Subject: Re: How to add source files in kernel In-Reply-To: Message-ID: References: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1848 Lines: 53 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. - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/