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)18void _close(void) 19 { 20 } 21 22 __attribute__((weak)) _fstat(void)23void _fstat(void) 24 { 25 } 26 27 __attribute__((weak)) _getpid(void)28void _getpid(void) 29 { 30 } 31 32 __attribute__((weak)) _isatty(void)33void _isatty(void) 34 { 35 } 36 37 __attribute__((weak)) _kill(void)38void _kill(void) 39 { 40 } 41 42 __attribute__((weak)) _lseek(void)43void _lseek(void) 44 { 45 } 46 47 __attribute__((weak)) _read(void)48void _read(void) 49 { 50 } 51 52 __attribute__((weak)) _write(void)53void _write(void) 54 { 55 } 56