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