1/* SPDX-License-Identifier: BSD-2-Clause */
2/*
3 * Copyright (c) 2015, Linaro Limited
4 * Copyright (c) 2020, Arm Limited
5 */
6
7#include <asm.S>
8
9	.section .text
10
11	.macro LDELF_SYSCALL name, scn, num_args
12	FUNC \name , :
13
14	.if \num_args > 8
15	.error "Too many arguments for syscall"
16	.endif
17
18	mov	x8, #(\scn)
19	svc	#0
20	ret
21	END_FUNC \name
22	.endm
23
24	FUNC _ldelf_panic, :
25	stp	x29, x30, [sp, #-16]!
26	mov	x1, sp
27	bl	__ldelf_panic
28	/* Not reached */
29	END_FUNC _ldelf_panic
30
31#include "syscalls_asm.S"
32
33BTI(emit_aarch64_feature_1_and     GNU_PROPERTY_AARCH64_FEATURE_1_BTI)
34