title: Missing something in arm g++
body: <p>I installed the CodeSourcery g++ toolchain and tried to compile a simple hello world program:</p>
  
  <pre><code>#include &lt;iostream&gt;
  
  using namespace std;
  
  int main()
  {
      cout &lt;&lt; "Hello World" &lt;&lt; endl;
      return 0;
  }
  </code></pre>
  
  <p>And got a lot of errors from the linker</p>
  
  <pre><code>$ arm-none-eabi-g++ helloworld.cpp -o helloworld.exe
  bin/ld: warning: cannot find entry symbol _start; defaulting to 0000000000008018
  lib/libc.a(lib_a-abort.o): In function `abort':
  abort.c:(.text.abort+0x10): undefined reference to `_exit'
  lib/libc.a(lib_a-fstatr.o): In function `_fstat_r':
  fstatr.c:(.text._fstat_r+0x1c): undefined reference to `_fstat'
  lib/libc.a(lib_a-openr.o): In function `_open_r':
  openr.c:(.text._open_r+0x20): undefined reference to `_open'
  lib/libc.a(lib_a-sbrkr.o): In function `_sbrk_r':
  sbrkr.c:(.text._sbrk_r+0x18): undefined reference to `_sbrk'
  lib/libc.a(lib_a-signalr.o): In function `_kill_r':
  signalr.c:(.text._kill_r+0x1c): undefined reference to `_kill'
  lib/libc.a(lib_a-signalr.o): In function `_getpid_r':
  signalr.c:(.text._getpid_r+0x4): undefined reference to `_getpid'
  lib/libc.a(lib_a-writer.o): In function `_write_r':
  writer.c:(.text._write_r+0x20): undefined reference to `_write'
  lib/libc.a(lib_a-closer.o): In function `_close_r':
  closer.c:(.text._close_r+0x18): undefined reference to `_close'
  lib/libc.a(lib_a-isattyr.o): In function `_isatty_r':
  isattyr.c:(.text._isatty_r+0x18): undefined reference to `_isatty'
  lib/libc.a(lib_a-lseekr.o): In function `_lseek_r':
  lseekr.c:(.text._lseek_r+0x20): undefined reference to `_lseek'
  lib/libc.a(lib_a-readr.o): In function `_read_r':
  readr.c:(.text._read_r+0x20): undefined reference to `_read'
  collect2: ld returned 1 exit status
  </code></pre>
  
  <p>What library am I missing here?</p>