blob: 0a96ba1355f84300a823a3c9d143153654ee272e [file] [log] [blame]
Tom Rini83d290c2018-05-06 17:58:06 -04001// SPDX-License-Identifier: GPL-2.0+
Wolfgang Denkf772acf2009-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 Denkf772acf2009-08-17 13:17:29 +02006 */
7
Tom Rini7410cde2024-04-30 07:35:59 -06008#include <stdio.h>
9#include <linux/stddef.h>
10#include <linux/string.h>
Wolfgang Denkf772acf2009-08-17 13:17:29 +020011
12int raise (int signum)
13{
Simon Glassfe901f22012-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 Denkf772acf2009-08-17 13:17:29 +020016 printf("raise: Signal # %d caught\n", signum);
Christian Riesch5cb939f2011-11-29 00:11:03 +000017#endif
Wolfgang Denkf772acf2009-08-17 13:17:29 +020018 return 0;
19}
Wolfgang Denkcd4b02b2010-05-10 23:08:02 +020020
21/* Dummy function to avoid linker complaints */
22void __aeabi_unwind_cpp_pr0(void)
23{
Jeroen Hofsteef2cbb032014-07-30 21:54:53 +020024}
Wolfgang Grandegger953209b2011-11-10 01:51:29 +000025
26void __aeabi_unwind_cpp_pr1(void)
27{
Jeroen Hofsteef2cbb032014-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}