title: What is the "__gmon_start__" symbol?
body: <p>I'm compiling this code with <code>gcc hello.c -o hello -O3</code>:</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  
  int main(void) {
      printf("Hello world\n");
      return 0;
  }
  </code></pre>
  
  <p>and when I list the relocations I get:</p>
  
  <pre><code>test@southpark$ readelf -r hello | grep gmon
  080495a4  00000106 R_386_GLOB_DAT    00000000   __gmon_start__
  080495b4  00000107 R_386_JUMP_SLOT   00000000   __gmon_start__
  </code></pre>
  
  <p>When I list the symbols in this file I get:</p>
  
  <pre><code>test@southpark$ readelf -s hello | grep gmon
       1: 00000000     0 NOTYPE  WEAK   DEFAULT  UND __gmon_start__
      48: 00000000     0 NOTYPE  WEAK   DEFAULT  UND __gmon_start__
  </code></pre>
  
  <p>Does <code>gmon_start</code> have anything to do with gprof? Why does it have a relocation for that symbol even I didn't compile/link with <code>-pg</code> or <code>-g</code>? What library would resolve this symbol?</p>