Technical Blog

Newlib error during compile

Earlier I was working on the problem with compiling using the arm-elf-gcc on very basic programs. After some work, I found the base problem is that the libc replacement from newlib are not being picked up at compile time and properly using the syscalls mechanism. Hardwired hacks to work around it produced an executable but something is still wrong with how the compiler was built.

I’ve distilled the error down to a single search.

Google Search: “/lib/libc.a(lib_a-exit.o): In function exit':" "newlib/libc/stdlib/exit.c:65: undefined reference to _exit’”

Several other people appear to have run into the same problem, so I’ll be reading up on the problem and see what solutions exist.