Skip to content

Commit 1ff9f9e

Browse files
agattidpgeorge
authored andcommitted
qemu/mcu/arm/startup: Add an implementation for "abort".
This commit adds a naive implementation of the "abort" standard C library, that is needed by certain C++ runtimes let code link. Although the Arm toolchain used in the CI image does not need this, newer or different toolchains may actually need this (eg. the Arm EABI toolchain provided by Arch Linux). Given the limited scope of the QEMU port, the function simply spins forever. Signed-off-by: Alessandro Gatti <a.gatti@frob.it>
1 parent 65dabf8 commit 1ff9f9e

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

ports/qemu/mcu/arm/startup.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,12 @@ void exit(int status) {
139139
}
140140
}
141141

142+
void abort(void) {
143+
for (;;) {
144+
}
145+
MP_UNREACHABLE;
146+
}
147+
142148
#ifndef NDEBUG
143149
void __assert_func(const char *file, int line, const char *func, const char *expr) {
144150
(void)func;

0 commit comments

Comments
 (0)