Kernel Newbies archive on
 help / color / Atom feed
From: Bernd Petrovitsch <>
To: "Irfan Ullah (울라 이르판)" <>,
Subject: Re: Kernel Module with multiple source files not initializing
Date: Sun, 27 Oct 2019 09:43:32 +0100
Message-ID: <> (raw)
In-Reply-To: <>

Hi all!

On 25/10/2019 11:14, Irfan Ullah (울라 이르판) wrote:
> Dear All,
> I have developed a kernel module consists of one source file that sends
> and receives  message to the user space.  I have spitted the source code
> in two files, and now I  am trying to develop kernel module from these
> source files. After compiling and linking without any problems, I insmod
> the module but I didn’t see any of the printk() I wrote, in fact, the
> module can be inserted and removed, but it does nothing. Code is in the
> attached file zipped file.
> I tried many things , e.g.,  link <>1, link2
> <>;,
> and link3
> <> etc. 
> but nothings worked out. 
> I also used /nm/ to inspect the module, but, as expected, there was no> signs of "__init and __exit" functions can in the output.

To be exact, you are looking for the hello_init function.
Since "nm" doesn't show it, it's either not there or

[ for the nm-output see in the OPs mail ]
> Can you please help me: what's the problem/mistake I am doing?
> Thank you very much.

Get rid of the "static" for the hello_init and hello_exit function.

Bernd Petrovitsch                  Email :
                     LUGA :

Kernelnewbies mailing list

  parent reply index

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-25  9:14 Irfan Ullah (울라 이르판)
2019-10-25 16:15 ` Abu Rasheda
2019-10-27  7:11   ` Irfan Ullah (울라 이르판)
2019-10-27  8:43 ` Bernd Petrovitsch [this message]
2019-10-28  9:43   ` Irfan Ullah (울라 이르판)
2019-10-28 10:04     ` Bernd Petrovitsch
2019-10-29  8:30       ` Irfan Ullah (울라 이르판)
2019-11-05 16:52 ` Aruna Hewapathirane
2019-11-07  1:50   ` Irfan Ullah (울라 이르판)

Reply instructions:

You may reply publically 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:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Kernel Newbies archive on

Archives are clonable:
	git clone --mirror kernelnewbies/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 kernelnewbies kernelnewbies/ \
	public-inbox-index kernelnewbies

Example config snippet for mirrors

Newsgroup available over NNTP:

AGPL code for this site: git clone