title: Newlib stubs in static library
body: <p>I am using Eclipse to develop bare-metal applications. I link against newlib, so I provided my own implementation of _sbrk(). This function was normally included in my project, and everything was working great.</p>
  
  <p>Now I try to move this function to a static library that I have developed over the last months.</p>
  
  <p>During linking I get an <code>undefined reference to _sbrk</code> error. The path the file is located is properly included to the Eclipse settings (other files in the same directory are linked correctly).</p>
  
  <p>Obviously there is some problem with the order the linker goes through my code, and this function is discarded.</p>
  
  <p>I tried using <code>__attribute__((used))</code>, without luck.</p>
  
  <p>How can I overcome this problem, <strong>through the Eclipse settings?</strong> (Makefile based or command line compilation is not the solution I need).</p>