Skip to content

Instantly share code, notes, and snippets.

@zz-jason
Created March 22, 2017 10:13
Show Gist options
  • Save zz-jason/ab4cb5c6ebd37535f917c9278e04933d to your computer and use it in GitHub Desktop.
Save zz-jason/ab4cb5c6ebd37535f917c9278e04933d to your computer and use it in GitHub Desktop.
使用 gcc 的 __attribute__ 扩展来控制符号的可见性

gcc 4.0 以上的版本中支持通过 __attribute__((visibility("default"))) 来显示符号,__attribute__((visibility("hidden"))) 来隐藏符号

参考:Visibility - GCC WiKi

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment