title: Undefined reference to __libc_init_array
body: <p>I am trying to compile some code for an STM32 chip using CodeBench G++ Lite tools. However, it generates an error.</p>
  
  <pre><code>    startup.o: In function `LoopFillZerobss':
  (.text.Reset_Handler+0x2a): undefined reference to `__libc_init_array'
  </code></pre>
  
  <p>I have googled and it appears that libc_init_array is probably part of some standard gcc library...but I am not sure how to fix this error?</p>
  
  <p>I also have errors such as this</p>
  
  <pre><code>arm-none-eabi-ld: cannot find libc.a
  </code></pre>
  
  <p>and similarly for libgcc.a and libm.a</p>