1/* 2 * Copyright (C) 2017 Linaro, Ltd. <ard.biesheuvel@linaro.org> 3 * 4 * This program is free software; you can redistribute it and/or modify 5 * it under the terms of the GNU General Public License version 2 as 6 * published by the Free Software Foundation. 7 * 8 */ 9 10#include <linux/linkage.h> 11 12ENTRY(absolute_data64) 13 ldr x0, 0f 14 ret 150: .quad sym64_abs 16ENDPROC(absolute_data64) 17 18ENTRY(absolute_data32) 19 ldr w0, 0f 20 ret 210: .long sym32_abs 22ENDPROC(absolute_data32) 23 24ENTRY(absolute_data16) 25 adr x0, 0f 26 ldrh w0, [x0] 27 ret 280: .short sym16_abs, 0 29ENDPROC(absolute_data16) 30 31ENTRY(signed_movw) 32 movz x0, #:abs_g2_s:sym64_abs 33 movk x0, #:abs_g1_nc:sym64_abs 34 movk x0, #:abs_g0_nc:sym64_abs 35 ret 36ENDPROC(signed_movw) 37 38ENTRY(unsigned_movw) 39 movz x0, #:abs_g3:sym64_abs 40 movk x0, #:abs_g2_nc:sym64_abs 41 movk x0, #:abs_g1_nc:sym64_abs 42 movk x0, #:abs_g0_nc:sym64_abs 43 ret 44ENDPROC(unsigned_movw) 45 46 .align 12 47 .space 0xff8 48ENTRY(relative_adrp) 49 adrp x0, sym64_rel 50 add x0, x0, #:lo12:sym64_rel 51 ret 52ENDPROC(relative_adrp) 53 54 .align 12 55 .space 0xffc 56ENTRY(relative_adrp_far) 57 adrp x0, memstart_addr 58 add x0, x0, #:lo12:memstart_addr 59 ret 60ENDPROC(relative_adrp_far) 61 62ENTRY(relative_adr) 63 adr x0, sym64_rel 64 ret 65ENDPROC(relative_adr) 66 67ENTRY(relative_data64) 68 adr x1, 0f 69 ldr x0, [x1] 70 add x0, x0, x1 71 ret 720: .quad sym64_rel - . 73ENDPROC(relative_data64) 74 75ENTRY(relative_data32) 76 adr x1, 0f 77 ldr w0, [x1] 78 add x0, x0, x1 79 ret 800: .long sym64_rel - . 81ENDPROC(relative_data32) 82 83ENTRY(relative_data16) 84 adr x1, 0f 85 ldrsh w0, [x1] 86 add x0, x0, x1 87 ret 880: .short sym64_rel - ., 0 89ENDPROC(relative_data16) 90