1/* SPDX-License-Identifier: BSD-2-Clause */ 2/* 3 * Copyright (c) 2024, Arm Limited and Contributors. All rights reserved. 4 * Copyright (c) 2014, STMicroelectronics International N.V. 5 */ 6 7#if defined(BTI_ENABLED) 8#include <arm64_bti.S> 9 10#define BTI(...) __VA_ARGS__ 11#else 12#define BTI(...) 13#endif 14 15 .macro FUNC name colon section=default 16 .ifc \section\(),default 17 .section .text.\name 18 .else 19 .section \section , "ax" , %progbits 20 .endif 21 .global \name 22 .type \name , %function 23 .balign 4 24 \name \colon 25 BTI(bti c) 26 .endm 27 28 .macro DATA name colon 29 .global \name 30 .type \name , %object 31 \name \colon 32 .endm 33 34 .macro LOCAL_FUNC name colon section=default 35 .ifc \section\(),default 36 .section .text.\name 37 .else 38 .section \section , "ax" , %progbits 39 .endif 40 .type \name , %function 41 .balign 4 42 \name \colon 43 BTI(bti c) 44 .endm 45 46 .macro LOCAL_DATA name colon 47 .type \name , %object 48 \name \colon 49 .endm 50 51 .macro END_DATA name 52 .size \name , .-\name 53 .endm 54 55 .macro END_FUNC name 56 .size \name , .-\name 57 .endm 58