1 /* 2 * Adapted from u-boot's arch/arm/lib/eabi_compat.c 3 * 4 * Copyright (C) 2017, Red Hat Inc, Andrew Jones <drjones@redhat.com> 5 * 6 * This work is licensed under the terms of the GNU GPL, version 2. 7 */ 8 #include <libcflat.h> 9 10 /* Needed to compile with -Wmissing-prototypes */ 11 int raise(int signum); 12 void __aeabi_unwind_cpp_pr0(void); 13 void __aeabi_unwind_cpp_pr1(void); 14 raise(int signum __unused)15int raise(int signum __unused) 16 { 17 printf("Divide by zero!\n"); 18 abort(); 19 return 0; 20 } 21 22 /* Dummy functions to avoid linker complaints */ __aeabi_unwind_cpp_pr0(void)23void __aeabi_unwind_cpp_pr0(void) 24 { 25 } 26 __aeabi_unwind_cpp_pr1(void)27void __aeabi_unwind_cpp_pr1(void) 28 { 29 } 30