blob: 0a96ba1355f84300a823a3c9d143153654ee272e [file] [log] [blame]
Tom Rini10e47792018-05-06 17:58:06 -04001// SPDX-License-Identifier: GPL-2.0+
Wolfgang Denkd47f4862009-08-17 13:17:29 +02002/*
3 * Utility functions needed for (some) EABI conformant tool chains.
4 *
5 * (C) Copyright 2009 Wolfgang Denk <wd@denx.de>
Wolfgang Denkd47f4862009-08-17 13:17:29 +02006 */
7
Tom Rinidec7ea02024-05-20 13:35:03 -06008#include <stdio.h>
9#include <linux/stddef.h>
10#include <linux/string.h>
Wolfgang Denkd47f4862009-08-17 13:17:29 +020011
12int raise (int signum)
13{
Simon Glass188d9712012-03-03 12:33:15 -080014 /* Even if printf() is available, it's large. Punt it for SPL builds */
15#if !defined(CONFIG_SPL_BUILD)
Wolfgang Denkd47f4862009-08-17 13:17:29 +020016 printf("raise: Signal # %d caught\n", signum);
Christian Riesch86657d42011-11-29 00:11:03 +000017#endif
Wolfgang Denkd47f4862009-08-17 13:17:29 +020018 return 0;
19}
Wolfgang Denk36b69702010-05-10 23:08:02 +020020
21/* Dummy function to avoid linker complaints */
22void __aeabi_unwind_cpp_pr0(void)
23{
Jeroen Hofstee30f527d2014-07-30 21:54:53 +020024}
Wolfgang Grandegger74b04d92011-11-10 01:51:29 +000025
26void __aeabi_unwind_cpp_pr1(void)
27{
Jeroen Hofstee30f527d2014-07-30 21:54:53 +020028}
29
30/* Copy memory like memcpy, but no return value required. */
31void __aeabi_memcpy(void *dest, const void *src, size_t n)
32{
33 (void) memcpy(dest, src, n);
34}
35
36void __aeabi_memset(void *dest, size_t n, int c)
37{
38 (void) memset(dest, c, n);
39}