分类: 嵌入式
2015-04-28 09:33:30
wq41132015-04-28 10:03:19
__exit* macro
__exit定义在:include/linux/init.h
#ifdef MODULE
#define __exit __attribute__ ((__section__(".exit.text")))
#else
#define __exit __attribute_used__ __attribute__((__section__(".exit.text")))
#endif
The exit macro tells the compiler to put the function in the ".exit.text" section. The exit_data macro tells the compiler to put the data in the ".exit.
wq41132015-04-28 10:03:01
__init* macro
__init定义在:include/linux/init.h
#define __init __attribute__ ((__section__ (".init.text")))
#define __initdata __attribute__ ((__section__ (".init.data")))
It tells the compiler to put the variable or the function in a special section, which is declared in vmlinux.lds. init puts the function in the ".init.text" section and initdata&n