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]

 



	yes, i m also able to allocate shared memory, and use it normally as I do with the fresh kernel!!!

	In 2.4.18-3, which comes with Redhat7.3, I see the sys_shmget, other non-static functions in /proc/ksysm even without EXPORT_SYMBOL();

	I want to know what change is made!! I am after this from last 2 days, and couldnt find any solution!!!


On Mon, 26 Apr 2004 13:27:42 +0530
mohanlal jangir <mohanlal@samsung.com> wrote:

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


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


[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