当前位置: 技术问答>linux和unix
高手请进,下面的代码中的__attribute_used__有什么作用???
来源: 互联网 发布时间:2016-05-10
本文导语: static const char __module_depends[] __attribute_used__ __attribute__((section(".modinfo"))) = "depends=x_tables"; 上段代码中的__attribute_used__主要起什么作用?? | GCC的一个扩展属性 在Linux上这样的定义 #define __at...
static const char __module_depends[]
__attribute_used__
__attribute__((section(".modinfo"))) =
"depends=x_tables";
上段代码中的__attribute_used__主要起什么作用??
__attribute_used__
__attribute__((section(".modinfo"))) =
"depends=x_tables";
上段代码中的__attribute_used__主要起什么作用??
|
GCC的一个扩展属性
在Linux上这样的定义
#define __attribute_used__ __attribute__((__used__))
used
This attribute, attached to a function, means that code must be
emitted for the function even if it appears that the function is
not referenced. This is useful, for example, when the function is
referenced only in inline assembly.
在Linux上这样的定义
#define __attribute_used__ __attribute__((__used__))
used
This attribute, attached to a function, means that code must be
emitted for the function even if it appears that the function is
not referenced. This is useful, for example, when the function is
referenced only in inline assembly.