Re: how to export a symbol from kernel to be accessible in module.

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

 



Do you see shm.o in ipc directory after compiling the kernel?

Regards
Mohanlal

----- Original Message -----
From: "Saifuddin" <saif@odysseytec.com>
To: <kernelnewbies@nl.linux.org>
Sent: Monday, April 26, 2004 12:52 PM
Subject: how to export a symbol from kernel to be accessible in module.


>
> Hello everyone,
>
> Linux kernel version 2.4.24
>
> ipc/shm.c
>
> static struct ipc_ids shm_ids;
>
> I want to access this variable in other kernel modules.
> for this a macro is defined in ipc/shm.c
>
> #define shm_get(id)     ((struct shmid_kernel *)ipc_get(&shm_ids,id));
>
>
> for this I have written a function in ipc/shm.c as below: -
>
> void *sys_getshmhandler(int id){
>          return (void *)shm_get(id);
> }
>
> EXPORT_SYMBOL(sys_getshmhandler);
>
> ipc/Makefile
>
> export-objs := shm.o.
>
> The kernel compiles successfully, but when I boot the fresh kernel, I do
not get the exported symbol in /proc/ksysm.
>
> What am I missing?
> Can anybody figure out?
>
> Thanks in advance.
>
> --
> Regards,
> Saifuddin,
> saif@odysseytec.com.
> saifuddin_it@yahoo.co.in.
>
> --
> Kernelnewbies: Help each other learn about the Linux kernel.
> Archive:       http://mail.nl.linux.org/kernelnewbies/
> FAQ:           http://kernelnewbies.org/faq/
>
>


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