Re: debugging kernel module __init function?

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

 



>> In this case, no.  But I’m curious if there’s a way to pull this off, or if it’s fundamentally impossible?

What happens 'after' __init gets called ?

After boot, the kernel frees up a special section. All functions
marked with __init and data structures marked with __initdata are
dropped after boot is complete.

Similarly 'modules' DISCARD this memory after initialization.

So what is the workaround ?  Write the module_init function without
the __init attribute.

( They never read the documentation :
/Documentation/DocBook/kernel-hacking.tmpl , I never used to read the
documentation either :)

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@xxxxxxxxxxxxxxxxx
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies




[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