1 /*
2  * Copyright (c) 2023, Arm Limited. All rights reserved.
3  *
4  * SPDX-License-Identifier: BSD-3-Clause
5  *
6  */
7 
8 /*
9  * NOTE: When GNU Arm compiler version greater equal than *11.3.Rel1*, there is a linker issue that
10  * some system calls are not implemented, such as _close, _fstat and _getpid etc. So add this file
11  * including stub functions of system calls to avoid the above linker issue.
12  */
13 
14 #include <stddef.h>
15 #include <stdint.h>
16 
17 __attribute__((weak))
_close(void)18 void _close(void)
19 {
20 }
21 
22 __attribute__((weak))
_fstat(void)23 void _fstat(void)
24 {
25 }
26 
27 __attribute__((weak))
_getpid(void)28 void _getpid(void)
29 {
30 }
31 
32 __attribute__((weak))
_isatty(void)33 void _isatty(void)
34 {
35 }
36 
37 __attribute__((weak))
_kill(void)38 void _kill(void)
39 {
40 }
41 
42 __attribute__((weak))
_lseek(void)43 void _lseek(void)
44 {
45 }
46 
47 __attribute__((weak))
_read(void)48 void _read(void)
49 {
50 }
51 
52 __attribute__((weak))
_write(void)53 void _write(void)
54 {
55 }
56