---------- Forwarded message ----------
From: Octavian Purdila <tavi@xxxxxxxxx>
Date: Aug 25, 2006 3:39 PM
Subject: Re: sys_open undefined! when i try to load module
To: kernelnewbies@xxxxxxxxxxxx
Cc: suman adak <gnusuman@xxxxxxxxx
>
On Friday 25 August 2006 16:16, suman adak wrote:
> Hi list,
>
> I just tried to read a file from kernel space. I called sys_open()..but
And maybe you want to read why you should not do that:
http://kernelnewbies.org/FAQ/WhyWritingFilesFromKernelIsBadBest regards
> when i try to load the module , it is saying sys_open undefined.
> I can see in System.map file that this symbol has been exported.Why my
> module is saying like that? Can anybody help me why this error message
> comes ?or did i do any mistake..
> ...
> Error output:
>
> Building modules, stage 2.
> MODPOST
> *** Warning: "sys_open"
> [/home/suman/amit_saha/amit/read_file/my_module/read_file_module.ko]
> undefined!
>
> P.S: Please don't tell the it is not good to use sys_open.. I know ..just i
> want to see
In order to access kernel symbols (functions, global variables) from a kernel
module, they need to be exported. Since accessing sys_* functions from
modules is wrong, the kernel does not export these kinds of functions.
If you really want to play with them, you need to modify and recompile the
kernel (see EXPORT_SYMBOL).
tavi
--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:
http://mail.nl.linux.org/kernelnewbies/FAQ:
http://kernelnewbies.org/faq/