Tom Rini | 10e4779 | 2018-05-06 17:58:06 -0400 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0+ */ |
Daniel Schwierzeck | 848a7cc | 2016-05-26 15:28:38 +0200 | [diff] [blame] | 2 | |
Tom Rini | 2aaa27d | 2019-01-22 17:09:26 -0500 | [diff] [blame] | 3 | MEMORY { .spl_mem : ORIGIN = IMAGE_TEXT_BASE, \ |
| 4 | LENGTH = IMAGE_MAX_SIZE } |
Daniel Schwierzeck | 848a7cc | 2016-05-26 15:28:38 +0200 | [diff] [blame] | 5 | MEMORY { .bss_mem : ORIGIN = CONFIG_SPL_BSS_START_ADDR, \ |
| 6 | LENGTH = CONFIG_SPL_BSS_MAX_SIZE } |
| 7 | |
| 8 | OUTPUT_ARCH(mips) |
| 9 | ENTRY(_start) |
| 10 | SECTIONS |
| 11 | { |
| 12 | . = 0x00000000; |
| 13 | |
| 14 | . = ALIGN(4); |
| 15 | .text : { |
developer | 34106af | 2022-05-20 11:21:45 +0800 | [diff] [blame] | 16 | __text_start = .; |
Daniel Schwierzeck | 848a7cc | 2016-05-26 15:28:38 +0200 | [diff] [blame] | 17 | *(.text*) |
developer | 34106af | 2022-05-20 11:21:45 +0800 | [diff] [blame] | 18 | __text_end = .; |
Daniel Schwierzeck | 848a7cc | 2016-05-26 15:28:38 +0200 | [diff] [blame] | 19 | } > .spl_mem |
| 20 | |
| 21 | . = ALIGN(4); |
| 22 | .rodata : { |
| 23 | *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*))) |
| 24 | } > .spl_mem |
| 25 | |
| 26 | . = ALIGN(4); |
| 27 | .data : { |
| 28 | *(SORT_BY_ALIGNMENT(.data*)) |
| 29 | *(SORT_BY_ALIGNMENT(.sdata*)) |
| 30 | } > .spl_mem |
| 31 | |
developer | 25678a0 | 2020-04-21 09:28:37 +0200 | [diff] [blame] | 32 | #if defined(CONFIG_SPL_DM) || defined(CONFIG_SPL_LOADER_SUPPORT) |
Daniel Schwierzeck | 848a7cc | 2016-05-26 15:28:38 +0200 | [diff] [blame] | 33 | . = ALIGN(4); |
Andrew Scull | 5a9095c | 2022-05-30 10:00:04 +0000 | [diff] [blame] | 34 | __u_boot_list : { |
| 35 | KEEP(*(SORT(__u_boot_list*))); |
Daniel Schwierzeck | 848a7cc | 2016-05-26 15:28:38 +0200 | [diff] [blame] | 36 | } > .spl_mem |
| 37 | #endif |
| 38 | |
| 39 | . = ALIGN(4); |
| 40 | __image_copy_end = .; |
developer | 34106af | 2022-05-20 11:21:45 +0800 | [diff] [blame] | 41 | __image_copy_len = __image_copy_end - __text_start; |
Daniel Schwierzeck | 848a7cc | 2016-05-26 15:28:38 +0200 | [diff] [blame] | 42 | |
developer | fa8f330 | 2020-04-21 09:28:36 +0200 | [diff] [blame] | 43 | _image_binary_end = .; |
| 44 | |
Daniel Schwierzeck | 848a7cc | 2016-05-26 15:28:38 +0200 | [diff] [blame] | 45 | .bss (NOLOAD) : { |
| 46 | __bss_start = .; |
| 47 | *(.bss*) |
| 48 | *(.sbss*) |
| 49 | *(COMMON) |
| 50 | . = ALIGN(4); |
| 51 | __bss_end = .; |
| 52 | } > .bss_mem |
| 53 | |
Daniel Schwierzeck | ce2b89e | 2019-01-06 20:42:43 +0100 | [diff] [blame] | 54 | /* These mark the ABI of U-Boot for debuggers. */ |
| 55 | .mdebug.abi32 : { |
| 56 | KEEP(*(.mdebug.abi32)) |
Daniel Schwierzeck | 848a7cc | 2016-05-26 15:28:38 +0200 | [diff] [blame] | 57 | } |
Daniel Schwierzeck | ce2b89e | 2019-01-06 20:42:43 +0100 | [diff] [blame] | 58 | .mdebug.abi64 : { |
| 59 | KEEP(*(.mdebug.abi64)) |
Daniel Schwierzeck | 848a7cc | 2016-05-26 15:28:38 +0200 | [diff] [blame] | 60 | } |
| 61 | |
Daniel Schwierzeck | ce2b89e | 2019-01-06 20:42:43 +0100 | [diff] [blame] | 62 | /* This is the MIPS specific mdebug section. */ |
| 63 | .mdebug : { *(.mdebug) } |
Daniel Schwierzeck | 848a7cc | 2016-05-26 15:28:38 +0200 | [diff] [blame] | 64 | |
Daniel Schwierzeck | ce2b89e | 2019-01-06 20:42:43 +0100 | [diff] [blame] | 65 | /* Stabs debugging sections. */ |
| 66 | .stab 0 : { *(.stab) } |
| 67 | .stabstr 0 : { *(.stabstr) } |
| 68 | .stab.excl 0 : { *(.stab.excl) } |
| 69 | .stab.exclstr 0 : { *(.stab.exclstr) } |
| 70 | .stab.index 0 : { *(.stab.index) } |
| 71 | .stab.indexstr 0 : { *(.stab.indexstr) } |
| 72 | .comment 0 : { *(.comment) } |
Daniel Schwierzeck | 848a7cc | 2016-05-26 15:28:38 +0200 | [diff] [blame] | 73 | |
Daniel Schwierzeck | ce2b89e | 2019-01-06 20:42:43 +0100 | [diff] [blame] | 74 | /* |
| 75 | * DWARF debug sections. |
| 76 | * Symbols in the DWARF debugging sections are relative to |
| 77 | * the beginning of the section so we begin them at 0. |
| 78 | */ |
| 79 | /* DWARF 1 */ |
| 80 | .debug 0 : { *(.debug) } |
| 81 | .line 0 : { *(.line) } |
| 82 | /* GNU DWARF 1 extensions */ |
| 83 | .debug_srcinfo 0 : { *(.debug_srcinfo) } |
| 84 | .debug_sfnames 0 : { *(.debug_sfnames) } |
| 85 | /* DWARF 1.1 and DWARF 2 */ |
| 86 | .debug_aranges 0 : { *(.debug_aranges) } |
| 87 | .debug_pubnames 0 : { *(.debug_pubnames) } |
| 88 | /* DWARF 2 */ |
| 89 | .debug_info 0 : { |
| 90 | *(.debug_info |
| 91 | .gnu.linkonce.wi.*) |
Daniel Schwierzeck | 848a7cc | 2016-05-26 15:28:38 +0200 | [diff] [blame] | 92 | } |
Daniel Schwierzeck | ce2b89e | 2019-01-06 20:42:43 +0100 | [diff] [blame] | 93 | .debug_abbrev 0 : { *(.debug_abbrev) } |
| 94 | .debug_line 0 : { *(.debug_line) } |
| 95 | .debug_frame 0 : { *(.debug_frame) } |
| 96 | .debug_str 0 : { *(.debug_str) } |
| 97 | .debug_loc 0 : { *(.debug_loc) } |
| 98 | .debug_macinfo 0 : { *(.debug_macinfo) } |
| 99 | .debug_pubtypes 0 : { *(.debug_pubtypes) } |
| 100 | /* DWARF 3 */ |
| 101 | .debug_ranges 0 : { *(.debug_ranges) } |
| 102 | /* SGI/MIPS DWARF 2 extensions */ |
| 103 | .debug_weaknames 0 : { *(.debug_weaknames) } |
| 104 | .debug_funcnames 0 : { *(.debug_funcnames) } |
| 105 | .debug_typenames 0 : { *(.debug_typenames) } |
| 106 | .debug_varnames 0 : { *(.debug_varnames) } |
| 107 | /* GNU DWARF 2 extensions */ |
| 108 | .debug_gnu_pubnames 0 : { *(.debug_gnu_pubnames) } |
| 109 | .debug_gnu_pubtypes 0 : { *(.debug_gnu_pubtypes) } |
| 110 | /* DWARF 4 */ |
| 111 | .debug_types 0 : { *(.debug_types) } |
| 112 | /* DWARF 5 */ |
| 113 | .debug_macro 0 : { *(.debug_macro) } |
| 114 | .debug_addr 0 : { *(.debug_addr) } |
Daniel Schwierzeck | 848a7cc | 2016-05-26 15:28:38 +0200 | [diff] [blame] | 115 | |
Daniel Schwierzeck | ce2b89e | 2019-01-06 20:42:43 +0100 | [diff] [blame] | 116 | /DISCARD/ : { |
| 117 | /* ABI crap starts here */ |
| 118 | *(.MIPS.abiflags) |
| 119 | *(.MIPS.options) |
| 120 | *(.options) |
| 121 | *(.pdr) |
| 122 | *(.reginfo) |
| 123 | *(.eh_frame) |
Daniel Schwierzeck | 848a7cc | 2016-05-26 15:28:38 +0200 | [diff] [blame] | 124 | } |
| 125 | } |