Depends you want to use syscalls.o or libg.a?
Kr,Jo
missing newlib stubs
Moderators: RoccoMarco, lbednarz, tfAteba
Re: missing newlib stubs
I ran in to basically the same problem:
With GCC version:
As a cross-reference, I found discussion on this Sourceforge bug: http://sourceforge.net/p/chibios/bugs/571/
which led me to add "-fno-use-linker-plugin" to "USE_OPT", which seems to have worked. I'm not sure what the impact on LTO was.
Code: Select all
`_sbrk_r' referenced in section `.text._malloc_r' of /home/bnewbold/bin/gcc-arm-none-eabi-4_9-2014q4/bin/../lib/gcc/arm-none-eabi/4.9.3/../../../../arm-none-eabi/lib/armv7e-m/libg.a(lib_a-mallocr.o): defined in discarded section `.text' of build/obj/syscalls.o (symbol from plugin)
`_sbrk_r' referenced in section `.text._malloc_r' of /home/bnewbold/bin/gcc-arm-none-eabi-4_9-2014q4/bin/../lib/gcc/arm-none-eabi/4.9.3/../../../../arm-none-eabi/lib/armv7e-m/libg.a(lib_a-mallocr.o): defined in discarded section `.text' of build/obj/syscalls.o (symbol from plugin)
`_sbrk_r' referenced in section `.text._malloc_trim_r' of /home/bnewbold/bin/gcc-arm-none-eabi-4_9-2014q4/bin/../lib/gcc/arm-none-eabi/4.9.3/../../../../arm-none-eabi/lib/armv7e-m/libg.a(lib_a-freer.o): defined in discarded section `.text' of build/obj/syscalls.o (symbol from plugin)
`_sbrk_r' referenced in section `.text._malloc_trim_r' of /home/bnewbold/bin/gcc-arm-none-eabi-4_9-2014q4/bin/../lib/gcc/arm-none-eabi/4.9.3/../../../../arm-none-eabi/lib/armv7e-m/libg.a(lib_a-freer.o): defined in discarded section `.text' of build/obj/syscalls.o (symbol from plugin)
`_sbrk_r' referenced in section `.text._malloc_trim_r' of /home/bnewbold/bin/gcc-arm-none-eabi-4_9-2014q4/bin/../lib/gcc/arm-none-eabi/4.9.3/../../../../arm-none-eabi/lib/armv7e-m/libg.a(lib_a-freer.o): defined in discarded section `.text' of build/obj/syscalls.o (symbol from plugin)
collect2: error: ld returned 1 exit status
With GCC version:
Code: Select all
bnewbold@ent$ arm-none-eabi-gcc --version
arm-none-eabi-gcc (GNU Tools for ARM Embedded Processors) 4.9.3 20141119 (release) [ARM/embedded-4_9-branch revision 218278]As a cross-reference, I found discussion on this Sourceforge bug: http://sourceforge.net/p/chibios/bugs/571/
which led me to add "-fno-use-linker-plugin" to "USE_OPT", which seems to have worked. I'm not sure what the impact on LTO was.