Re: Kernel Module with multiple source files not initializing

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

 



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 <https://paguilar.org/?p=7>1, link2
> <https://www.linuxquestions.org/questions/linux-kernel-70/kernel-module-with-multiple-source-files-not-initializing-886190/>;,
> and link3
> <https://android.googlesource.com/kernel/msm/+/android-msm-dory-3.10-kitkat-wear/Documentation/kbuild/modules.txt> 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
"static".

[ 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.

MfG,
	Bernd
-- 
Bernd Petrovitsch                  Email : bernd@xxxxxxxxxxxxxxxxxxx
                     LUGA : http://www.luga.at


_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@xxxxxxxxxxxxxxxxx
https://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