Newer
Older
barebox / arch / arm / lib64 / runtime-offset.S
@Sascha Hauer Sascha Hauer on 21 Mar 2018 337 bytes ARM: aarch64: Add runtime-offset
#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)