现在位置: 首页 > weak
2018年05月30日 技术文章 ⁄ 共 1101字 __attribute__ 之weak,alias属性已关闭评论 ⁄ 阅读 1,685 次
Weak Alias 是 gcc 扩展里的东西,实际上是函数的属性。这个东西在库的实现里面可能会经常用到,比如 glibc 里面就用了不少。抄录一段 gcc 手册里面的话解释下函数属性是干啥的 In GNU C, you declare certain things about functions called in your program which help the compiler optimize function calls and check your code more carefully. 先上代码,看看 weak alias 怎么写。 第一个文件 dummy.c 内容 int __foo...
阅读全文
×