1*4882a593Smuzhiyun /* SPDX-License-Identifier: GPL-2.0 */ 2*4882a593Smuzhiyun #include <asm/page.h> 3*4882a593Smuzhiyun 4*4882a593Smuzhiyun /* 5*4882a593Smuzhiyun * .boot.data section is shared between the decompressor code and the 6*4882a593Smuzhiyun * decompressed kernel. The decompressor will store values in it, and copy 7*4882a593Smuzhiyun * over to the decompressed image before starting it. 8*4882a593Smuzhiyun * 9*4882a593Smuzhiyun * .boot.data variables are kept in separate .boot.data.<var name> sections, 10*4882a593Smuzhiyun * which are sorted by alignment first, then by name before being merged 11*4882a593Smuzhiyun * into single .boot.data section. This way big holes cased by page aligned 12*4882a593Smuzhiyun * structs are avoided and linker produces consistent result. 13*4882a593Smuzhiyun */ 14*4882a593Smuzhiyun #define BOOT_DATA \ 15*4882a593Smuzhiyun . = ALIGN(PAGE_SIZE); \ 16*4882a593Smuzhiyun .boot.data : { \ 17*4882a593Smuzhiyun __boot_data_start = .; \ 18*4882a593Smuzhiyun *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.boot.data*))) \ 19*4882a593Smuzhiyun __boot_data_end = .; \ 20*4882a593Smuzhiyun } 21*4882a593Smuzhiyun 22*4882a593Smuzhiyun /* 23*4882a593Smuzhiyun * .boot.preserved.data is similar to .boot.data, but it is not part of the 24*4882a593Smuzhiyun * .init section and thus will be preserved for later use in the decompressed 25*4882a593Smuzhiyun * kernel. 26*4882a593Smuzhiyun */ 27*4882a593Smuzhiyun #define BOOT_DATA_PRESERVED \ 28*4882a593Smuzhiyun . = ALIGN(PAGE_SIZE); \ 29*4882a593Smuzhiyun .boot.preserved.data : { \ 30*4882a593Smuzhiyun __boot_data_preserved_start = .; \ 31*4882a593Smuzhiyun *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.boot.preserved.data*))) \ 32*4882a593Smuzhiyun __boot_data_preserved_end = .; \ 33*4882a593Smuzhiyun } 34