s390/boot: move sclp early buffer from fixed address in asm to C
[linux-2.6-microblaze.git] / arch / s390 / boot / compressed / vmlinux.lds.S
1 /* SPDX-License-Identifier: GPL-2.0 */
2 #include <asm-generic/vmlinux.lds.h>
3 #include <asm/vmlinux.lds.h>
4 #include <asm/thread_info.h>
5 #include <asm/page.h>
6 #include <asm/sclp.h>
7
8 OUTPUT_FORMAT("elf64-s390", "elf64-s390", "elf64-s390")
9 OUTPUT_ARCH(s390:64-bit)
10
11 ENTRY(startup)
12
13 SECTIONS
14 {
15         . = 0;
16         .head.text : {
17                 _head = . ;
18                 HEAD_TEXT
19                 _ehead = . ;
20         }
21         .text : {
22                 _text = .;      /* Text */
23                 *(.text)
24                 *(.text.*)
25                 _etext = . ;
26         }
27         .rodata : {
28                 _rodata = . ;
29                 *(.rodata)       /* read-only data */
30                 *(.rodata.*)
31                 _erodata = . ;
32         }
33         NOTES
34         .data : {
35                 _data = . ;
36                 *(.data)
37                 *(.data.*)
38                 _edata = . ;
39         }
40         /*
41         * .dma section for code, data, ex_table that need to stay below 2 GB,
42         * even when the kernel is relocate: above 2 GB.
43         */
44         . = ALIGN(PAGE_SIZE);
45         _sdma = .;
46         .dma.text : {
47                 _stext_dma = .;
48                 *(.dma.text)
49                 . = ALIGN(PAGE_SIZE);
50                 _etext_dma = .;
51         }
52         . = ALIGN(16);
53         .dma.ex_table : {
54                 _start_dma_ex_table = .;
55                 KEEP(*(.dma.ex_table))
56                 _stop_dma_ex_table = .;
57         }
58         .dma.data : {
59                 *(.dma.data)
60         }
61         . = ALIGN(PAGE_SIZE);
62         _edma = .;
63
64         BOOT_DATA
65         BOOT_DATA_PRESERVED
66
67         /*
68          * This is the BSS section of the decompressor and not of the decompressed Linux kernel.
69          * It will consume place in the decompressor's image.
70          */
71         . = ALIGN(8);
72         .bss : {
73                 _bss = . ;
74                 *(.bss)
75                 *(.bss.*)
76                 *(COMMON)
77                 /*
78                  * Stacks for the decompressor
79                  */
80                 . = ALIGN(PAGE_SIZE);
81                 _dump_info_stack_start = .;
82                 . += PAGE_SIZE;
83                 _dump_info_stack_end = .;
84                 . = ALIGN(PAGE_SIZE);
85                 _stack_start = .;
86                 . += BOOT_STACK_SIZE;
87                 _stack_end = .;
88                 _ebss = .;
89         }
90
91         /*
92          * uncompressed image info used by the decompressor it should match
93          * struct vmlinux_info. It comes from .vmlinux.info section of
94          * uncompressed vmlinux in a form of info.o
95          */
96         . = ALIGN(8);
97         .vmlinux.info : {
98                 _vmlinux_info = .;
99                 *(.vmlinux.info)
100         }
101
102         .decompressor.syms : {
103                 . += 1; /* make sure we have \0 before the first entry */
104                 . = ALIGN(2);
105                 _decompressor_syms_start = .;
106                 *(.decompressor.syms)
107                 _decompressor_syms_end = .;
108         }
109
110 #ifdef CONFIG_KERNEL_UNCOMPRESSED
111         . = 0x100000;
112 #else
113         . = ALIGN(8);
114 #endif
115         .rodata.compressed : {
116                 _compressed_start = .;
117                 *(.vmlinux.bin.compressed)
118                 _compressed_end = .;
119                 FILL(0xff);
120                 . = ALIGN(4096);
121         }
122         _end = .;
123
124         /* Sections to be discarded */
125         /DISCARD/ : {
126                 *(.eh_frame)
127                 *(__ex_table)
128                 *(*__ksymtab*)
129                 *(___kcrctab*)
130         }
131 }