title: What is the practical difference between a static function and a function with the "hidden" visibility attribute?
body: <p>I know that using the <code>static</code> keyword in C on a function restricts the function to the compilation unit in which it is defined. I am now looking into symbol visibility, and I'm a little confused about the difference between <code>static</code> functions and function marked with <code>__attribute__((visibility("hidden")))</code>, or using the <code>-fvisibility=hidden</code> command-line option.</p>
  
  <p>I have a feeling that the way these change things under-the-hood is not at all the same, but I don't know what the difference is nor what it implies when working with them in actual code. What changes between the two, and when would you want to use one over the other?</p>