Commit | Line | Data |
---|---|---|
b2441318 | 1 | /* SPDX-License-Identifier: GPL-2.0 */ |
1844c9bc | 2 | #include <asm-generic/vmlinux.lds.h> |
d1b52a43 | 3 | #include <asm/vmlinux.lds.h> |
256d78d0 AE |
4 | #include <asm/thread_info.h> |
5 | #include <asm/page.h> | |
f1d3c532 | 6 | #include <asm/sclp.h> |
834979c2 | 7 | #include "boot.h" |
1844c9bc | 8 | |
1844c9bc MS |
9 | OUTPUT_FORMAT("elf64-s390", "elf64-s390", "elf64-s390") |
10 | OUTPUT_ARCH(s390:64-bit) | |
1844c9bc MS |
11 | |
12 | ENTRY(startup) | |
13 | ||
14 | SECTIONS | |
15 | { | |
1844c9bc | 16 | . = 0; |
834979c2 HC |
17 | .ipldata : { |
18 | *(.ipldata) | |
19 | } | |
20 | . = IPL_START; | |
1844c9bc MS |
21 | .head.text : { |
22 | _head = . ; | |
23 | HEAD_TEXT | |
24 | _ehead = . ; | |
25 | } | |
f84d88ed HC |
26 | . = PARMAREA; |
27 | .parmarea : { | |
28 | *(.parmarea) | |
29 | } | |
1844c9bc MS |
30 | .text : { |
31 | _text = .; /* Text */ | |
32 | *(.text) | |
33 | *(.text.*) | |
34 | _etext = . ; | |
35 | } | |
36 | .rodata : { | |
37 | _rodata = . ; | |
38 | *(.rodata) /* read-only data */ | |
369f91c3 | 39 | *(.rodata.*) |
1844c9bc MS |
40 | _erodata = . ; |
41 | } | |
7a84ffc0 | 42 | NOTES |
1844c9bc MS |
43 | .data : { |
44 | _data = . ; | |
45 | *(.data) | |
46 | *(.data.*) | |
47 | _edata = . ; | |
48 | } | |
a80313ff | 49 | |
d1b52a43 | 50 | BOOT_DATA |
bf9921a9 | 51 | BOOT_DATA_PRESERVED |
d1b52a43 | 52 | |
980d5f9a AE |
53 | /* |
54 | * This is the BSS section of the decompressor and not of the decompressed Linux kernel. | |
55 | * It will consume place in the decompressor's image. | |
56 | */ | |
57 | . = ALIGN(8); | |
58 | .bss : { | |
59 | _bss = . ; | |
60 | *(.bss) | |
61 | *(.bss.*) | |
62 | *(COMMON) | |
256d78d0 AE |
63 | /* |
64 | * Stacks for the decompressor | |
65 | */ | |
66 | . = ALIGN(PAGE_SIZE); | |
67 | _dump_info_stack_start = .; | |
68 | . += PAGE_SIZE; | |
69 | _dump_info_stack_end = .; | |
70 | . = ALIGN(PAGE_SIZE); | |
71 | _stack_start = .; | |
72 | . += BOOT_STACK_SIZE; | |
73 | _stack_end = .; | |
980d5f9a AE |
74 | _ebss = .; |
75 | } | |
76 | ||
369f91c3 VG |
77 | /* |
78 | * uncompressed image info used by the decompressor it should match | |
79 | * struct vmlinux_info. It comes from .vmlinux.info section of | |
80 | * uncompressed vmlinux in a form of info.o | |
81 | */ | |
82 | . = ALIGN(8); | |
83 | .vmlinux.info : { | |
84 | _vmlinux_info = .; | |
85 | *(.vmlinux.info) | |
86 | } | |
87 | ||
24621896 VG |
88 | .decompressor.syms : { |
89 | . += 1; /* make sure we have \0 before the first entry */ | |
90 | . = ALIGN(2); | |
91 | _decompressor_syms_start = .; | |
92 | *(.decompressor.syms) | |
93 | _decompressor_syms_end = .; | |
94 | } | |
95 | ||
f913a660 VG |
96 | _decompressor_end = .; |
97 | ||
89b5202e VG |
98 | #ifdef CONFIG_KERNEL_UNCOMPRESSED |
99 | . = 0x100000; | |
2d6f74f7 VG |
100 | #else |
101 | . = ALIGN(8); | |
89b5202e VG |
102 | #endif |
103 | .rodata.compressed : { | |
369f91c3 VG |
104 | _compressed_start = .; |
105 | *(.vmlinux.bin.compressed) | |
106 | _compressed_end = .; | |
aa127a06 PO |
107 | } |
108 | ||
109 | #define SB_TRAILER_SIZE 32 | |
110 | /* Trailer needed for Secure Boot */ | |
111 | . += SB_TRAILER_SIZE; /* make sure .sb.trailer does not overwrite the previous section */ | |
112 | . = ALIGN(4096) - SB_TRAILER_SIZE; | |
113 | .sb.trailer : { | |
114 | QUAD(0) | |
115 | QUAD(0) | |
116 | QUAD(0) | |
117 | QUAD(0x000000207a49504c) | |
89b5202e | 118 | } |
1844c9bc | 119 | _end = .; |
47d67fac VG |
120 | |
121 | /* Sections to be discarded */ | |
122 | /DISCARD/ : { | |
123 | *(.eh_frame) | |
3ad6b250 | 124 | *(__ex_table) |
47d67fac | 125 | *(*__ksymtab*) |
4778dc08 | 126 | *(___kcrctab*) |
47d67fac | 127 | } |
1844c9bc | 128 | } |