Hello, I am working on a bare metal C++ ELF project targeting Zynq CPU1 (the 2nd CPU). I successfully tested a simple Xilinx standalone application, and then started removing dependence on the standalone BSP, like this:
* I removed the BSP include and library paths from the project.
* I rewrote the startup.s and asm_vectors.s to not depend on any code from BSP.
But g++ linker is apparently still pulling in libc, as you can see below. I will NOT use any libc functions. Is there a way to tell g++ not to link against libc at all? Thank you for your help!
arm-xilinx-eabi-g++ -L"/mnt/work/Dorking/QP/qpcpp/ports/arm/qk/zynq_rproc/Debug" -Wl,-T -Wl,../src/lscript.ld -o "cpu1app.elf" ./src/bsp.o ./src/main.o ./src/philo.o ./src/table.o -lqk
/mnt/opt/Xilinx/SDK/2014.4/gnu/arm/lin/bin/../lib/gcc/arm-xilinx-eabi/4.8.3/../../../../arm-xilinx-eabi/lib/libc.a(lib_a-abort.o): In function `abort':
abort.c:(.text+0x10): undefined reference to `_exit'
...