kernel-misc
__init and __exit attributes
__init and __exit are kernel macros, defined in include/linux/init.h, as
shown here:
#define __init
#define __exit
__section(.init.text)
__section(.exit.text)
__init and __exit are Linux directives (macros) that wrap GNU C compiler attributes used for symbol placement. They instruct the compiler to put the code they prefix in the .init.text and .exit.text sections.
This applies only to built-in modules, not to loadable ones
A kernel module uses its .modinfo section to store information about the module. Any MODULE_* macro will update the content of this section with the values passed as
parameters.
You can dump the content of the .modeinfo section of a kernel module using the
objdump -d -j .modinfo
Comments
Post a Comment