From beed7117adc92edf3e5aefb1d341e29eab90b17d Mon Sep 17 00:00:00 2001 From: Bogdan Marinescu Date: Mon, 29 Jul 2013 18:13:37 +0300 Subject: [PATCH] Add __cxa_pure_virtual to avoid pulling in functions from the C++ library Fixes PRMBED-859 --- libraries/mbed/common/exit.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/libraries/mbed/common/exit.c b/libraries/mbed/common/exit.c index f1f4bc2ca1..1785b386e6 100644 --- a/libraries/mbed/common/exit.c +++ b/libraries/mbed/common/exit.c @@ -15,6 +15,7 @@ */ #include "semihost_api.h" #include "mbed_interface.h" +#include "toolchain.h" #ifdef TOOLCHAIN_GCC_CW // TODO: Ideally, we would like to define directly "_ExitProcess" @@ -34,3 +35,9 @@ void exit(int return_code) { while (1); } + +WEAK void __cxa_pure_virtual(void); +WEAK void __cxa_pure_virtual(void) { + exit(1); +} +