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.
Signature · 4 lines
Regards, Saifuddin, [email protected]. [email protected].