blob: 9ebe78e97eb563af41fe2f65405f05bcee4a2558 [file] [log] [blame]
Kevin Peng9dff9862023-10-09 11:06:08 +08001/*
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))
18void _close(void)
19{
20}
21
22__attribute__((weak))
23void _fstat(void)
24{
25}
26
27__attribute__((weak))
28void _getpid(void)
29{
30}
31
32__attribute__((weak))
33void _isatty(void)
34{
35}
36
37__attribute__((weak))
38void _kill(void)
39{
40}
41
42__attribute__((weak))
43void _lseek(void)
44{
45}
46
47__attribute__((weak))
48void _read(void)
49{
50}
51
52__attribute__((weak))
53void _write(void)
54{
55}