forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-01-31 f9004dbfff8a3fbbd7e2a88c8a4327c7f2f8e5b2
kernel/arch/arm/boot/compressed/vmlinux.lds.S
....@@ -1,10 +1,8 @@
1
+/* SPDX-License-Identifier: GPL-2.0-only */
12 /*
23 * Copyright (C) 2000 Russell King
3
- *
4
- * This program is free software; you can redistribute it and/or modify
5
- * it under the terms of the GNU General Public License version 2 as
6
- * published by the Free Software Foundation.
74 */
5
+#include <asm/vmlinux.lds.h>
86
97 #ifdef CONFIG_CPU_ENDIAN_BE8
108 #define ZIMAGE_MAGIC(x) ( (((x) >> 24) & 0x000000ff) | \
....@@ -20,8 +18,11 @@
2018 SECTIONS
2119 {
2220 /DISCARD/ : {
21
+ COMMON_DISCARDS
2322 *(.ARM.exidx*)
2423 *(.ARM.extab*)
24
+ *(.note.*)
25
+ *(.rel.*)
2526 /*
2627 * Discard any r/w data - this produces a link error if we have any,
2728 * which is required for PIC decompression. Local data generates
....@@ -39,17 +40,16 @@
3940 *(.start)
4041 *(.text)
4142 *(.text.*)
42
- *(.fixup)
43
- *(.gnu.warning)
44
- *(.glue_7t)
45
- *(.glue_7)
43
+ ARM_STUBS_TEXT
4644 }
4745 .table : ALIGN(4) {
4846 _table_start = .;
49
- LONG(ZIMAGE_MAGIC(4))
47
+ LONG(ZIMAGE_MAGIC(6))
5048 LONG(ZIMAGE_MAGIC(0x5a534c4b))
5149 LONG(ZIMAGE_MAGIC(__piggy_size_addr - _start))
5250 LONG(ZIMAGE_MAGIC(_kernel_bss_size))
51
+ LONG(ZIMAGE_MAGIC(TEXT_OFFSET))
52
+ LONG(ZIMAGE_MAGIC(MALLOC_SIZE))
5353 LONG(0)
5454 _table_end = .;
5555 }
....@@ -67,9 +67,11 @@
6767 _etext = .;
6868
6969 .got.plt : { *(.got.plt) }
70
+#ifndef CONFIG_EFI_STUB
7071 _got_start = .;
7172 .got : { *(.got) }
7273 _got_end = .;
74
+#endif
7375
7476 /* ensure the zImage file size is always a multiple of 64 bits */
7577 /* (without a dummy byte, ld just ignores the empty section) */
....@@ -78,11 +80,14 @@
7880 #ifdef CONFIG_EFI_STUB
7981 .data : ALIGN(4096) {
8082 __pecoff_data_start = .;
83
+ _got_start = .;
84
+ *(.got)
85
+ _got_end = .;
8186 /*
8287 * The EFI stub always executes from RAM, and runs strictly before the
8388 * decompressor, so we can make an exception for its r/w data, and keep it
8489 */
85
- *(.data.efistub)
90
+ *(.data.efistub .bss.efistub)
8691 __pecoff_data_end = .;
8792
8893 /*
....@@ -127,12 +132,10 @@
127132 PROVIDE(__pecoff_data_size = ALIGN(512) - ADDR(.data));
128133 PROVIDE(__pecoff_end = ALIGN(512));
129134
130
- .stab 0 : { *(.stab) }
131
- .stabstr 0 : { *(.stabstr) }
132
- .stab.excl 0 : { *(.stab.excl) }
133
- .stab.exclstr 0 : { *(.stab.exclstr) }
134
- .stab.index 0 : { *(.stab.index) }
135
- .stab.indexstr 0 : { *(.stab.indexstr) }
136
- .comment 0 : { *(.comment) }
135
+ STABS_DEBUG
136
+ DWARF_DEBUG
137
+ ARM_DETAILS
138
+
139
+ ARM_ASSERTS
137140 }
138141 ASSERT(_edata_real == _edata, "error: zImage file size is incorrect");