1 /* SPDX-License-Identifier: LGPL-2.1 OR MIT */ 1 2 /* 3 * NOLIBC compiler support header 4 * Copyright (C) 2023 Thomas Weißschuh <linux 5 */ 6 #ifndef _NOLIBC_COMPILER_H 7 #define _NOLIBC_COMPILER_H 8 9 #if defined(__has_attribute) 10 # define __nolibc_has_attribute(attr) __has_a 11 #else 12 # define __nolibc_has_attribute(attr) 0 13 #endif 14 15 #if __nolibc_has_attribute(naked) 16 # define __nolibc_entrypoint __attribute__((n 17 # define __nolibc_entrypoint_epilogue() 18 #else 19 # define __nolibc_entrypoint __attribute__((o 20 # define __nolibc_entrypoint_epilogue() __bui 21 #endif /* __nolibc_has_attribute(naked) */ 22 23 #if defined(__SSP__) || defined(__SSP_STRONG__ 24 25 #define _NOLIBC_STACKPROTECTOR 26 27 #endif /* defined(__SSP__) ... */ 28 29 #if __nolibc_has_attribute(no_stack_protector) 30 # define __no_stack_protector __attribute__(( 31 #else 32 # define __no_stack_protector __attribute__(( 33 #endif /* __nolibc_has_attribute(no_stack_prot 34 35 #endif /* _NOLIBC_COMPILER_H */ 36
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.