Re: kernel module spanning multiple files

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

 



Dave, Sunny thank you.
it worked :)

On Wed, Jun 15, 2011 at 11:24 PM, Dave Hylands <dhylands@xxxxxxxxx> wrote:
> Hi Prashat,
>
> On Wed, Jun 15, 2011 at 10:29 AM, Prashant Shah <pshah.mumbai@xxxxxxxxx> wrote:
>> Hi amit,
>>
>> On Wed, Jun 15, 2011 at 3:29 PM, amit mehta <gmate.amit@xxxxxxxxx> wrote:
>>> Hi,
>>>
>>> static int __init hello_init(void)
>>> {
>>>        printk(KERN_WARNING "Hello world\n");
>>>        foo(); //defined in anther file
>>
>> I removed the foo(); call
>>
>>> [root@localhost #] cat Makefile
>>> obj-m += hello_multi.o
>>> hello_multi-objs := helper.o
>>
>> I removed the "hello_multi-objs := helper.o" line
>
> The hello_multi-objs is supposed to contain all of the objects.
>
> So you need:
>
> hello_multi-objs := object1.o object2.o
>
> Since the kernel build system will create hello_multi.o as a result of
> building the multi object, you can't use a source file named
> hello-multi.c.
>
> You could do
>
> hello_multi-objs := hello.o helper.o
>
> and rename your hello_multi.c to be hello.c
>
> --
> Dave Hylands
> Shuswap, BC, Canada
> http://www.davehylands.com
>

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@xxxxxxxxxxxxxxxxx
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies



[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