forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-09-20 a36159eec6ca17402b0e146b86efaf76568dc353
kernel/arch/s390/boot/compressed/vmlinux.lds.S
....@@ -1,5 +1,6 @@
11 /* SPDX-License-Identifier: GPL-2.0 */
22 #include <asm-generic/vmlinux.lds.h>
3
+#include <asm/vmlinux.lds.h>
34
45 OUTPUT_FORMAT("elf64-s390", "elf64-s390", "elf64-s390")
56 OUTPUT_ARCH(s390:64-bit)
....@@ -8,9 +9,6 @@
89
910 SECTIONS
1011 {
11
- /* Be careful parts of head_64.S assume startup_32 is at
12
- * address 0.
13
- */
1412 . = 0;
1513 .head.text : {
1614 _head = . ;
....@@ -26,7 +24,7 @@
2624 .rodata : {
2725 _rodata = . ;
2826 *(.rodata) /* read-only data */
29
- *(EXCLUDE_FILE (*piggy.o) .rodata.compressed)
27
+ *(.rodata.*)
3028 _erodata = . ;
3129 }
3230 .data : {
....@@ -35,23 +33,75 @@
3533 *(.data.*)
3634 _edata = . ;
3735 }
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
+
3985 #ifdef CONFIG_KERNEL_UNCOMPRESSED
4086 . = 0x100000;
4187 #else
4288 . = ALIGN(8);
4389 #endif
4490 .rodata.compressed : {
45
- *(.rodata.compressed)
91
+ _compressed_start = .;
92
+ *(.vmlinux.bin.compressed)
93
+ _compressed_end = .;
4694 }
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)
55105 }
56106 _end = .;
57107