87cb3d45b4bd8a58d9c17478ec7eebf74078ac5e
[linux-2.6-microblaze.git] / arch / arm64 / kernel / image-vars.h
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 /*
3  * Linker script variables to be set after section resolution, as
4  * ld.lld does not like variables assigned before SECTIONS is processed.
5  */
6 #ifndef __ARM64_KERNEL_IMAGE_VARS_H
7 #define __ARM64_KERNEL_IMAGE_VARS_H
8
9 #ifndef LINKER_SCRIPT
10 #error This file should only be included in vmlinux.lds.S
11 #endif
12
13 #ifdef CONFIG_EFI
14
15 __efistub_kernel_size           = _edata - _text;
16
17
18 /*
19  * The EFI stub has its own symbol namespace prefixed by __efistub_, to
20  * isolate it from the kernel proper. The following symbols are legally
21  * accessed by the stub, so provide some aliases to make them accessible.
22  * Only include data symbols here, or text symbols of functions that are
23  * guaranteed to be safe when executed at another offset than they were
24  * linked at. The routines below are all implemented in assembler in a
25  * position independent manner
26  */
27 __efistub_memcmp                = __pi_memcmp;
28 __efistub_memchr                = __pi_memchr;
29 __efistub_memcpy                = __pi_memcpy;
30 __efistub_memmove               = __pi_memmove;
31 __efistub_memset                = __pi_memset;
32 __efistub_strlen                = __pi_strlen;
33 __efistub_strnlen               = __pi_strnlen;
34 __efistub_strcmp                = __pi_strcmp;
35 __efistub_strncmp               = __pi_strncmp;
36 __efistub_strrchr               = __pi_strrchr;
37 __efistub___flush_dcache_area   = __pi___flush_dcache_area;
38
39 #ifdef CONFIG_KASAN
40 __efistub___memcpy              = __pi_memcpy;
41 __efistub___memmove             = __pi_memmove;
42 __efistub___memset              = __pi_memset;
43 #endif
44
45 __efistub__text                 = _text;
46 __efistub_stext                 = stext;
47 __efistub__end                  = _end;
48 __efistub__edata                = _edata;
49 __efistub_screen_info           = screen_info;
50
51 #endif
52
53 #endif /* __ARM64_KERNEL_IMAGE_VARS_H */