From: dhylands@gmail.com (Dave Hylands)
To: kernelnewbies@lists.kernelnewbies.org
Subject: kernel module spanning multiple files
Date: Wed, 15 Jun 2011 10:54:26 -0700 [thread overview]
Message-ID: <BANLkTincouGQ_zksdDNLs9PfDXMZJZf8Cg@mail.gmail.com> (raw)
In-Reply-To: <BANLkTikGBN8qiM4A=RWO7=U6+QncNtrsaQ@mail.gmail.com>
Hi Prashat,
On Wed, Jun 15, 2011 at 10:29 AM, Prashant Shah <pshah.mumbai@gmail.com> wrote:
> Hi amit,
>
> On Wed, Jun 15, 2011 at 3:29 PM, amit mehta <gmate.amit@gmail.com> 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 at 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
next prev parent reply other threads:[~2011-06-15 17:54 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-15 9:59 kernel module spanning multiple files amit mehta
2011-06-15 10:09 ` amit mehta
2011-06-15 17:29 ` Prashant Shah
2011-06-15 17:54 ` Dave Hylands [this message]
2011-06-16 3:27 ` amit mehta
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=BANLkTincouGQ_zksdDNLs9PfDXMZJZf8Cg@mail.gmail.com \
--to=dhylands@gmail.com \
--cc=kernelnewbies@lists.kernelnewbies.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).