kernelnewbies.kernelnewbies.org archive mirror
 help / color / mirror / Atom feed
From: gmate.amit@gmail.com (amit mehta)
To: kernelnewbies@lists.kernelnewbies.org
Subject: kernel module spanning multiple files
Date: Thu, 16 Jun 2011 08:57:32 +0530	[thread overview]
Message-ID: <BANLkTimh+_-bGO4-JeceLc_vOQGdXd=8RQ@mail.gmail.com> (raw)
In-Reply-To: <BANLkTincouGQ_zksdDNLs9PfDXMZJZf8Cg@mail.gmail.com>

Dave, Sunny thank you.
it worked :)

On Wed, Jun 15, 2011 at 11:24 PM, Dave Hylands <dhylands@gmail.com> wrote:
> 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
>

      reply	other threads:[~2011-06-16  3:27 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
2011-06-16  3:27     ` amit mehta [this message]

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='BANLkTimh+_-bGO4-JeceLc_vOQGdXd=8RQ@mail.gmail.com' \
    --to=gmate.amit@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).