Re: mmap info

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

 





srinivas bakki wrote:

So u mean to say, if i know the offset then i can reach up that location.
How can i know the offset of my .kernel section in my running program.
Thanks
Anurag


well, this again boils down to your original question :) . you cannot
know the offset of the section while you are running (dynamically).
well i have a doubt. this .kernel section is in the file you are
mapping right ?

     You have to write a linker script to generate symbols that mark
the start and end of your section. The kernel uses this trick for
initializing all the modules, without having to call them individually
by their names.
     An example of how this can be done is explained in the following link

  http://geek.vtnet.ca/doc/initcall/index.html


Vikesh




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