blob: d08d6222c4ab8d6859767104b3a1a03f9a998899 [file] [log] [blame]
Tom Rini83d290c2018-05-06 17:58:06 -04001/* SPDX-License-Identifier: GPL-2.0+ */
Daniel Schwierzeck07f5b962016-05-26 15:28:38 +02002
Tom Rini2f41ade2019-01-22 17:09:26 -05003MEMORY { .spl_mem : ORIGIN = IMAGE_TEXT_BASE, \
4 LENGTH = IMAGE_MAX_SIZE }
Daniel Schwierzeck07f5b962016-05-26 15:28:38 +02005MEMORY { .bss_mem : ORIGIN = CONFIG_SPL_BSS_START_ADDR, \
6 LENGTH = CONFIG_SPL_BSS_MAX_SIZE }
7
8OUTPUT_ARCH(mips)
9ENTRY(_start)
10SECTIONS
11{
12 . = 0x00000000;
13
14 . = ALIGN(4);
15 .text : {
16 *(.text*)
17 } > .spl_mem
18
19 . = ALIGN(4);
20 .rodata : {
21 *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))
22 } > .spl_mem
23
24 . = ALIGN(4);
25 .data : {
26 *(SORT_BY_ALIGNMENT(.data*))
27 *(SORT_BY_ALIGNMENT(.sdata*))
28 } > .spl_mem
29
30#ifdef CONFIG_SPL_DM
31 . = ALIGN(4);
32 .u_boot_list : {
33 KEEP(*(SORT(.u_boot_list*)));
34 } > .spl_mem
35#endif
36
37 . = ALIGN(4);
38 __image_copy_end = .;
39
40 .bss (NOLOAD) : {
41 __bss_start = .;
42 *(.bss*)
43 *(.sbss*)
44 *(COMMON)
45 . = ALIGN(4);
46 __bss_end = .;
47 } > .bss_mem
48
Daniel Schwierzeck2fdadc02019-01-06 20:42:43 +010049 /* These mark the ABI of U-Boot for debuggers. */
50 .mdebug.abi32 : {
51 KEEP(*(.mdebug.abi32))
52 }
53 .mdebug.abi64 : {
54 KEEP(*(.mdebug.abi64))
Daniel Schwierzeck07f5b962016-05-26 15:28:38 +020055 }
56
Daniel Schwierzeck2fdadc02019-01-06 20:42:43 +010057 /* This is the MIPS specific mdebug section. */
58 .mdebug : { *(.mdebug) }
Daniel Schwierzeck07f5b962016-05-26 15:28:38 +020059
Daniel Schwierzeck2fdadc02019-01-06 20:42:43 +010060 /* Stabs debugging sections. */
61 .stab 0 : { *(.stab) }
62 .stabstr 0 : { *(.stabstr) }
63 .stab.excl 0 : { *(.stab.excl) }
64 .stab.exclstr 0 : { *(.stab.exclstr) }
65 .stab.index 0 : { *(.stab.index) }
66 .stab.indexstr 0 : { *(.stab.indexstr) }
67 .comment 0 : { *(.comment) }
Daniel Schwierzeck07f5b962016-05-26 15:28:38 +020068
Daniel Schwierzeck2fdadc02019-01-06 20:42:43 +010069 /*
70 * DWARF debug sections.
71 * Symbols in the DWARF debugging sections are relative to
72 * the beginning of the section so we begin them at 0.
73 */
74 /* DWARF 1 */
75 .debug 0 : { *(.debug) }
76 .line 0 : { *(.line) }
77 /* GNU DWARF 1 extensions */
78 .debug_srcinfo 0 : { *(.debug_srcinfo) }
79 .debug_sfnames 0 : { *(.debug_sfnames) }
80 /* DWARF 1.1 and DWARF 2 */
81 .debug_aranges 0 : { *(.debug_aranges) }
82 .debug_pubnames 0 : { *(.debug_pubnames) }
83 /* DWARF 2 */
84 .debug_info 0 : {
85 *(.debug_info
86 .gnu.linkonce.wi.*)
Daniel Schwierzeck07f5b962016-05-26 15:28:38 +020087 }
Daniel Schwierzeck2fdadc02019-01-06 20:42:43 +010088 .debug_abbrev 0 : { *(.debug_abbrev) }
89 .debug_line 0 : { *(.debug_line) }
90 .debug_frame 0 : { *(.debug_frame) }
91 .debug_str 0 : { *(.debug_str) }
92 .debug_loc 0 : { *(.debug_loc) }
93 .debug_macinfo 0 : { *(.debug_macinfo) }
94 .debug_pubtypes 0 : { *(.debug_pubtypes) }
95 /* DWARF 3 */
96 .debug_ranges 0 : { *(.debug_ranges) }
97 /* SGI/MIPS DWARF 2 extensions */
98 .debug_weaknames 0 : { *(.debug_weaknames) }
99 .debug_funcnames 0 : { *(.debug_funcnames) }
100 .debug_typenames 0 : { *(.debug_typenames) }
101 .debug_varnames 0 : { *(.debug_varnames) }
102 /* GNU DWARF 2 extensions */
103 .debug_gnu_pubnames 0 : { *(.debug_gnu_pubnames) }
104 .debug_gnu_pubtypes 0 : { *(.debug_gnu_pubtypes) }
105 /* DWARF 4 */
106 .debug_types 0 : { *(.debug_types) }
107 /* DWARF 5 */
108 .debug_macro 0 : { *(.debug_macro) }
109 .debug_addr 0 : { *(.debug_addr) }
Daniel Schwierzeck07f5b962016-05-26 15:28:38 +0200110
Daniel Schwierzeck2fdadc02019-01-06 20:42:43 +0100111 /DISCARD/ : {
112 /* ABI crap starts here */
113 *(.MIPS.abiflags)
114 *(.MIPS.options)
115 *(.options)
116 *(.pdr)
117 *(.reginfo)
118 *(.eh_frame)
Daniel Schwierzeck07f5b962016-05-26 15:28:38 +0200119 }
120}