Hello.
I get this error upon linking:
in function `abort':
abort.c:(.text.abort+0xa): undefined reference to `_exit'
/home/storage/opt/gcc-arm-none-eabi-10-2020-q4-major/bin/../lib/gcc/arm-none-eabi/10.2.1/../../../../arm-none-eabi/bin/ld: /home/storage/opt/gcc-arm-none-eabi-10-2020-q4-major/bin/../lib/gcc/arm-none-eabi/10.2.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libg.a(lib_a-signalr.o): in function `_kill_r':
signalr.c:(.text._kill_r+0x12): undefined reference to `_kill'
/home/storage/opt/gcc-arm-none-eabi-10-2020-q4-major/bin/../lib/gcc/arm-none-eabi/10.2.1/../../../../arm-none-eabi/bin/ld: /home/storage/opt/gcc-arm-none-eabi-10-2020-q4-major/bin/../lib/gcc/arm-none-eabi/10.2.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libg.a(lib_a-signalr.o): in function `_getpid_r':
signalr.c:(.text._getpid_r+0x0): undefined reference to `_getpid'
collect2: error: ld returned 1 exit status
And this is even though I have added $(CHIBIOS)/os/various/syscalls.c\ to CSRC and I can see that in the call to gcc, syscalls.o is present.
arm-none-eabi-gcc ./build/obj/crt0_v7m.o ./build/obj/vectors.o ./build/obj/chcoreasm_v7m.o ./build/obj/syscalls.o
What could be the cause of this? Are there some other configurations to tweak here?
If anyone has any idea what could cause this let me know. ChibiOS version 20.3.2.
Thanks, have a great day.
undefined ref to _exit even though syscalls.c is added to CSRC
Moderators: RoccoMarco, lbednarz, utzig, tfAteba, barthess
-
- Posts: 10
- Joined: Wed Jul 31, 2019 10:38 am
- Been thanked: 1 time
- Giovanni
- Site Admin
- Posts: 14457
- Joined: Wed May 27, 2009 8:48 am
- Location: Salerno, Italy
- Has thanked: 1076 times
- Been thanked: 922 times
- Contact:
Re: undefined ref to _exit even though syscalls.c is added to CSRC
Hi,
In that version syscalls.c is not complete, you should update to 20.3.3 or 21.6.0.
Giovanni
In that version syscalls.c is not complete, you should update to 20.3.3 or 21.6.0.
Giovanni
-
- Posts: 10
- Joined: Wed Jul 31, 2019 10:38 am
- Been thanked: 1 time
Who is online
Users browsing this forum: No registered users and 49 guests