diff options
Diffstat (limited to 'arch/arm/lib/runtime-offset.S')
-rw-r--r-- | arch/arm/lib/runtime-offset.S | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/arch/arm/lib/runtime-offset.S b/arch/arm/lib/runtime-offset.S new file mode 100644 index 0000000000..ffa668cd7e --- /dev/null +++ b/arch/arm/lib/runtime-offset.S @@ -0,0 +1,17 @@ +#include <linux/linkage.h> +#include <asm/assembler.h> + +/* + * Get the offset between the link address and the address + * we are currently running at. + */ +ENTRY(get_runtime_offset) +1: adr r0, 1b + ldr r1, linkadr + subs r0, r1, r0 +THUMB( subs r0, r0, #1) + mov pc, lr + +linkadr: +.word get_runtime_offset +ENDPROC(get_runtime_offset) |