title: How to disassemble the main function of a stripped application?
body: <p>Let's say I compiled the application below and stripped it's symbols.</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  
  int main()
  {
      printf("Hello\n");
  }
  </code></pre>
  
  <p>Build procedure:</p>
  
  <pre><code>gcc -o hello hello.c
  strip --strip-unneeded hello
  </code></pre>
  
  <p>If the application wasn't stripped, disassembling the main function would be easy. However, I have no idea how to disassemble the <em>main</em> function of a stripped application.</p>
  
  <pre><code>(gdb) disas main
  No symbol table is loaded.  Use the "file" command.
  
  (gdb) info line main
  Function "main" not defined.
  </code></pre>
  
  <p>How could I do it? Is it even possible?</p>
  
  <p><strong>Notes</strong>: this must be done with GDB only. Forget <em>objdump</em>. Assume that I don't have access to the code.</p>
  
  <p>A step-by-step example would be greatly appreciated.</p>