RE: procfs.o insmod error

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

 



Hi,

As the command did not display anything, that means the symbol your
module is using is not exposed by either the core kernel or any base
modules on which your module is based. This means that you can not use
those symbols in your module.

For any Module it's important to use only those kernel symbols
(variables and function names) which have been exposed by core kernel or
base modules. We can not use the symbols which has not been exposed by
kernel. By exposing I mean we need to provide them out of the module
scope in which they hav been defined.

If you don't want to export any of you modules symbols (so that no other
module can use it), you need to use

EXPORT_NO_SYMBOLS;

macro in your module. You can use it anywhere in your module.

For more information refer to the 2nd chapter of "Linux Device Drivers"
by Rubini. Following is the link for that.

http://www.xml.com/ldd/chapter/book/ch02.html#t3

Regards,
Gaurav


-----Original Message-----
From: murad ali [mailto:zalmay_77@hotmail.com] 
Sent: Friday, July 02, 2004 12:53 PM
To: Dhiman, Gaurav
Subject: RE: procfs.o insmod error


Respected Friend
So nice of u for immediate reply. I applied the command
              #ksyms | grep <symbol name> | more
but no output get displayed.
kindly help me more n this regard.Also suggest for me some other
important 
materials
inorder to be a Module Programmer.
Wish u best of Luck.

>From: "Dhiman, Gaurav" <Gaurav.Dhiman@ca.com>
>To: "murad ali" <zalmay_77@hotmail.com>
>CC: <kernelnewbies@nl.linux.org>
>Subject: RE: procfs.o insmod error
>Date: Thu, 1 Jul 2004 11:53:03 +0530
>
>
>The errors you are getting while insmode is because of the symbols used
>in module, has not been exposed by core kernel or any base module.
>
>Run the following command and if you are not able to find the symbol in
>the output of this command then the problem is that module you want to
>load is using symbols which have not been exposed by either core kernel
>or the base modules.
>
>Command is:
>ksyms | grep <symbol name> | more
>
>Regards,
>Gaurav
>
>
>-----Original Message-----
>From: kernelnewbies-bounce@nl.linux.org
>[mailto:kernelnewbies-bounce@nl.linux.org] On Behalf Of murad ali
>Sent: Thursday, July 01, 2004 11:28 AM
>To: kernelnewbies@nl.linux.org
>Subject: procfs.o insmod error
>
>Hi Respected Colligues
>
>I am LKMP Learner. I  compiled The file procfs.c (in Linux kernel
Module
>
>Programming Guide) With following Command successfully
>gcc -c -o2 -isystem /lib/modules/2.4.19/include procfs.c
>But when I try to Insert it with insmod command , it get the following
>errors
>
>procfs.o: unresolved symbol proc_register
>procfs.o: unresolved symbol proc_unregister
>
>and with lsmod no modules get appears.
>soon reply will b hihly appretiated.
>wish u best of Luck
>
>_________________________________________________________________
>STOP MORE SPAM with the new MSN 8 and get 2 months FREE*
>http://join.msn.com/?page=features/junkmail
>
>
>--
>Kernelnewbies: Help each other learn about the Linux kernel.
>Archive:       http://mail.nl.linux.org/kernelnewbies/
>FAQ:           http://kernelnewbies.org/faq/
>
>

_________________________________________________________________
MSN 8 with e-mail virus protection service: 2 months FREE* 
http://join.msn.com/?page=features/virus



--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/



[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