title: Static compilation error with gcc
body: <p>I am trying to compile the following code :</p>
  
  <pre><code>#include&lt;stdio.h&gt;
  
  void func()
  {
      printf("In function\n");
      return ;
  }
  
  int main()
  {
      printf("In mains\n");
      func();
      return 0;
  }
  </code></pre>
  
  <p>using <code>gcc -static -o try try.c</code> but getting the following error :</p>
  
  <pre><code>/usr/bin/ld: error: hidden symbol '__ehdr_start' is not defined locally
  /usr/bin/ld: error: hidden symbol '__ehdr_start' is not defined locally
  /usr/bin/ld: error: hidden symbol '__ehdr_start' is not defined locally
  /usr/bin/ld: error: hidden symbol '__ehdr_start' is not defined locally
  /usr/bin/ld: error: hidden symbol '__ehdr_start' is not defined locally
  collect2: error: ld returned 1 exit status
  </code></pre>
  
  <p>am i doing anything wrong ?</p>
  
  <p>Gcc version i have is <code>gcc version 4.7.2 (Debian 4.7.2-5)</code></p>