.. | .. |
---|
1 | 1 | /* SPDX-License-Identifier: GPL-2.0 */ |
---|
2 | 2 | #include <asm-generic/vmlinux.lds.h> |
---|
| 3 | +#include <asm/vmlinux.lds.h> |
---|
3 | 4 | |
---|
4 | 5 | OUTPUT_FORMAT("elf64-s390", "elf64-s390", "elf64-s390") |
---|
5 | 6 | OUTPUT_ARCH(s390:64-bit) |
---|
.. | .. |
---|
8 | 9 | |
---|
9 | 10 | SECTIONS |
---|
10 | 11 | { |
---|
11 | | - /* Be careful parts of head_64.S assume startup_32 is at |
---|
12 | | - * address 0. |
---|
13 | | - */ |
---|
14 | 12 | . = 0; |
---|
15 | 13 | .head.text : { |
---|
16 | 14 | _head = . ; |
---|
.. | .. |
---|
26 | 24 | .rodata : { |
---|
27 | 25 | _rodata = . ; |
---|
28 | 26 | *(.rodata) /* read-only data */ |
---|
29 | | - *(EXCLUDE_FILE (*piggy.o) .rodata.compressed) |
---|
| 27 | + *(.rodata.*) |
---|
30 | 28 | _erodata = . ; |
---|
31 | 29 | } |
---|
32 | 30 | .data : { |
---|
.. | .. |
---|
35 | 33 | *(.data.*) |
---|
36 | 34 | _edata = . ; |
---|
37 | 35 | } |
---|
38 | | - startup_continue = 0x100000; |
---|
| 36 | + /* |
---|
| 37 | + * .dma section for code, data, ex_table that need to stay below 2 GB, |
---|
| 38 | + * even when the kernel is relocate: above 2 GB. |
---|
| 39 | + */ |
---|
| 40 | + . = ALIGN(PAGE_SIZE); |
---|
| 41 | + _sdma = .; |
---|
| 42 | + .dma.text : { |
---|
| 43 | + _stext_dma = .; |
---|
| 44 | + *(.dma.text) |
---|
| 45 | + . = ALIGN(PAGE_SIZE); |
---|
| 46 | + _etext_dma = .; |
---|
| 47 | + } |
---|
| 48 | + . = ALIGN(16); |
---|
| 49 | + .dma.ex_table : { |
---|
| 50 | + _start_dma_ex_table = .; |
---|
| 51 | + KEEP(*(.dma.ex_table)) |
---|
| 52 | + _stop_dma_ex_table = .; |
---|
| 53 | + } |
---|
| 54 | + .dma.data : { *(.dma.data) } |
---|
| 55 | + . = ALIGN(PAGE_SIZE); |
---|
| 56 | + _edma = .; |
---|
| 57 | + |
---|
| 58 | + BOOT_DATA |
---|
| 59 | + BOOT_DATA_PRESERVED |
---|
| 60 | + |
---|
| 61 | + /* |
---|
| 62 | + * This is the BSS section of the decompressor and not of the decompressed Linux kernel. |
---|
| 63 | + * It will consume place in the decompressor's image. |
---|
| 64 | + */ |
---|
| 65 | + . = ALIGN(8); |
---|
| 66 | + .bss : { |
---|
| 67 | + _bss = . ; |
---|
| 68 | + *(.bss) |
---|
| 69 | + *(.bss.*) |
---|
| 70 | + *(COMMON) |
---|
| 71 | + _ebss = .; |
---|
| 72 | + } |
---|
| 73 | + |
---|
| 74 | + /* |
---|
| 75 | + * uncompressed image info used by the decompressor it should match |
---|
| 76 | + * struct vmlinux_info. It comes from .vmlinux.info section of |
---|
| 77 | + * uncompressed vmlinux in a form of info.o |
---|
| 78 | + */ |
---|
| 79 | + . = ALIGN(8); |
---|
| 80 | + .vmlinux.info : { |
---|
| 81 | + _vmlinux_info = .; |
---|
| 82 | + *(.vmlinux.info) |
---|
| 83 | + } |
---|
| 84 | + |
---|
39 | 85 | #ifdef CONFIG_KERNEL_UNCOMPRESSED |
---|
40 | 86 | . = 0x100000; |
---|
41 | 87 | #else |
---|
42 | 88 | . = ALIGN(8); |
---|
43 | 89 | #endif |
---|
44 | 90 | .rodata.compressed : { |
---|
45 | | - *(.rodata.compressed) |
---|
| 91 | + _compressed_start = .; |
---|
| 92 | + *(.vmlinux.bin.compressed) |
---|
| 93 | + _compressed_end = .; |
---|
46 | 94 | } |
---|
47 | | - . = ALIGN(256); |
---|
48 | | - .bss : { |
---|
49 | | - _bss = . ; |
---|
50 | | - *(.bss) |
---|
51 | | - *(.bss.*) |
---|
52 | | - *(COMMON) |
---|
53 | | - . = ALIGN(8); /* For convenience during zeroing */ |
---|
54 | | - _ebss = .; |
---|
| 95 | + |
---|
| 96 | +#define SB_TRAILER_SIZE 32 |
---|
| 97 | + /* Trailer needed for Secure Boot */ |
---|
| 98 | + . += SB_TRAILER_SIZE; /* make sure .sb.trailer does not overwrite the previous section */ |
---|
| 99 | + . = ALIGN(4096) - SB_TRAILER_SIZE; |
---|
| 100 | + .sb.trailer : { |
---|
| 101 | + QUAD(0) |
---|
| 102 | + QUAD(0) |
---|
| 103 | + QUAD(0) |
---|
| 104 | + QUAD(0x000000207a49504c) |
---|
55 | 105 | } |
---|
56 | 106 | _end = .; |
---|
57 | 107 | |
---|