Weak Alias 跟 Weak Reference 完全没有任何关系,不过是我在看到 Weak Reference 的时候想到的而已. Weak Alias 是 gcc 扩展里的东西,实际上是函数的属性.这个东西在库的实现里面可能会经常用到,比如 glibc 里面就用了不少.抄录一段 gcc 手册里面的话解释下函数属性是干啥的, In GNU C, you declare certain things about functions called in your program which…
转自:https://gcc.gnu.org/onlinedocs/gcc-4.0.0/gcc/Function-Attributes.html 5.24 Declaring Attributes of Functions In GNU C, you declare certain things about functions called in your program which help the compiler optimize function calls and check your…