Fwd: Re: how to load module to kernel core?

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

 




I used the kernel compiling options also.my problem is i have load my module with the kernel


core i.e link it with the msg.o file before calling insmod command.


From: Ravi <ravivsn@roc.co.in>
To: praveen praveen <prav_6@hotmail.com>
CC: kernelnewbies@nl.linux.org, becker@scyld.com
Subject: Re: how to load module to kernel core?
Date: Mon, 26 May 2003 20:03:55 +0530

Hi Praveen,
If you compiled the program with cc -c only,then try compiling with the following options.
List all the warnings received.


cc -DMODULE -W -D_KERNEL__ -I/usr/src/linux-x.x.x module.c

Regards
Ravi


praveen praveen wrote:


hi,

I have written a module whose skeletal form is like this:

// kernel source (/usr/src/linux/ipc/msg.c


void (*fn_ptr)(void);


     int msgsnd(parameters)
     {

...

             if(fn_ptr)
                 (fn_ptr)();

}

// my module (module.c)

extern void (*fn_ptr)(void);

      void my_func(void)
      {
            ...

}

       int init_module(void)
       {
             fn_ptr=&my_func;

}

When i try to load the module :

$ cc -c module.c

$ ld -r -o module module.o /usr/src/linux/ipc/ipc.o

./module unresolved symbol shmem_lock,shmem_nopage

This is the error message i am getting.please tell me how to load a module to kernel

source which has recursive dependency.

thanks in advance.

- learner

_________________________________________________________________
Technical writer?. Earn more now! http://server1.msn.co.in/msnleads/tis/index.asp Find out how.


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



--


The views presented in this mail are completely mine. The company is not responsible for whatsoever. ------------------------------------------------------------------------ Ravi Kumar CH Rendezvous On Chip (i) Pvt Ltd Hyderabad, India Ph: +91-40-2335 1214 / 1175 / 1184

ROC home page <http://www.roc.co.in>




_________________________________________________________________
Staying fit. It's about being happy! http://server1.msn.co.in/features/stayingfit/index.asp Check out the new mantra.


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