summaryrefslogtreecommitdiffstats
path: root/arch/arm/lib64/runtime-offset.S
blob: 177ca64784f8b7588ade5bcc9b173a272fc49b77 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#include <linux/linkage.h>
#include <asm/assembler.h>

.section ".text_bare_init","ax"

/*
 * Get the offset between the link address and the address
 * we are currently running at.
 */
ENTRY(get_runtime_offset)
1:	adr x0, 1b
	ldr x1, linkadr
	subs x0, x0, x1
	ret

.align 3
linkadr:
.quad get_runtime_offset
ENDPROC(get_runtime_offset)