Tom Rini | 83d290c | 2018-05-06 17:58:06 -0400 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0+ */ |
Gabor Juhos | cb5dbca | 2013-01-30 04:31:52 +0000 | [diff] [blame] | 2 | /* |
| 3 | * (C) Copyright 2003 |
| 4 | * Wolfgang Denk Engineering, <wd@denx.de> |
Gabor Juhos | cb5dbca | 2013-01-30 04:31:52 +0000 | [diff] [blame] | 5 | */ |
| 6 | |
Gabor Juhos | cb5dbca | 2013-01-30 04:31:52 +0000 | [diff] [blame] | 7 | OUTPUT_ARCH(mips) |
| 8 | ENTRY(_start) |
| 9 | SECTIONS |
| 10 | { |
| 11 | . = 0x00000000; |
| 12 | |
| 13 | . = ALIGN(4); |
| 14 | .text : { |
Paul Burton | d263cda | 2016-09-21 11:11:06 +0100 | [diff] [blame] | 15 | __text_start = .; |
Gabor Juhos | cb5dbca | 2013-01-30 04:31:52 +0000 | [diff] [blame] | 16 | *(.text*) |
Paul Burton | d263cda | 2016-09-21 11:11:06 +0100 | [diff] [blame] | 17 | __text_end = .; |
Gabor Juhos | cb5dbca | 2013-01-30 04:31:52 +0000 | [diff] [blame] | 18 | } |
| 19 | |
| 20 | . = ALIGN(4); |
| 21 | .rodata : { |
| 22 | *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*))) |
| 23 | } |
| 24 | |
| 25 | . = ALIGN(4); |
| 26 | .data : { |
| 27 | *(.data*) |
| 28 | } |
| 29 | |
Gabor Juhos | cb5dbca | 2013-01-30 04:31:52 +0000 | [diff] [blame] | 30 | . = ALIGN(4); |
| 31 | .sdata : { |
| 32 | *(.sdata*) |
| 33 | } |
| 34 | |
| 35 | . = ALIGN(4); |
| 36 | .u_boot_list : { |
Albert ARIBAUD | ef123c5 | 2013-02-25 00:59:00 +0000 | [diff] [blame] | 37 | KEEP(*(SORT(.u_boot_list*))); |
Gabor Juhos | cb5dbca | 2013-01-30 04:31:52 +0000 | [diff] [blame] | 38 | } |
| 39 | |
Gabor Juhos | cb5dbca | 2013-01-30 04:31:52 +0000 | [diff] [blame] | 40 | . = ALIGN(4); |
Daniel Schwierzeck | 3420bf1 | 2013-02-12 22:22:12 +0100 | [diff] [blame] | 41 | __image_copy_end = .; |
Paul Burton | a0af08b | 2014-04-07 10:11:19 +0100 | [diff] [blame] | 42 | __init_end = .; |
Daniel Schwierzeck | 3420bf1 | 2013-02-12 22:22:12 +0100 | [diff] [blame] | 43 | |
Daniel Schwierzeck | 9630146 | 2018-11-01 02:02:21 +0100 | [diff] [blame] | 44 | .data.reloc : { |
Paul Burton | 703ec9d | 2017-06-19 11:53:47 -0700 | [diff] [blame] | 45 | __rel_start = .; |
Daniel Schwierzeck | 9630146 | 2018-11-01 02:02:21 +0100 | [diff] [blame] | 46 | /* |
| 47 | * Space for relocation table |
| 48 | * This needs to be filled so that the |
| 49 | * mips-reloc tool can overwrite the content. |
| 50 | * An invalid value is left at the start of the |
| 51 | * section to abort relocation if the table |
| 52 | * has not been filled in. |
| 53 | */ |
| 54 | LONG(0xFFFFFFFF); |
| 55 | FILL(0); |
| 56 | . += CONFIG_MIPS_RELOCATION_TABLE_SIZE - 4; |
Daniel Schwierzeck | 265072b | 2014-10-29 17:30:36 +0100 | [diff] [blame] | 57 | } |
| 58 | |
Daniel Schwierzeck | 9630146 | 2018-11-01 02:02:21 +0100 | [diff] [blame] | 59 | . = ALIGN(4); |
Daniel Schwierzeck | 79fd7e6 | 2013-10-11 17:46:59 +0200 | [diff] [blame] | 60 | _end = .; |
Gabor Juhos | 0ba8926 | 2013-02-12 22:22:13 +0100 | [diff] [blame] | 61 | |
Paul Burton | 703ec9d | 2017-06-19 11:53:47 -0700 | [diff] [blame] | 62 | .bss __rel_start (OVERLAY) : { |
Daniel Schwierzeck | a52852c | 2013-02-12 22:22:12 +0100 | [diff] [blame] | 63 | __bss_start = .; |
| 64 | *(.sbss.*) |
| 65 | *(.bss.*) |
| 66 | *(COMMON) |
| 67 | . = ALIGN(4); |
| 68 | __bss_end = .; |
Gabor Juhos | cb5dbca | 2013-01-30 04:31:52 +0000 | [diff] [blame] | 69 | } |
Gabor Juhos | 0ba8926 | 2013-02-12 22:22:13 +0100 | [diff] [blame] | 70 | |
Daniel Schwierzeck | 2fdadc0 | 2019-01-06 20:42:43 +0100 | [diff] [blame] | 71 | /* These mark the ABI of U-Boot for debuggers. */ |
| 72 | .mdebug.abi32 : { |
| 73 | KEEP(*(.mdebug.abi32)) |
| 74 | } |
| 75 | .mdebug.abi64 : { |
| 76 | KEEP(*(.mdebug.abi64)) |
Daniel Schwierzeck | 79fd7e6 | 2013-10-11 17:46:59 +0200 | [diff] [blame] | 77 | } |
| 78 | |
Daniel Schwierzeck | 2fdadc0 | 2019-01-06 20:42:43 +0100 | [diff] [blame] | 79 | /* This is the MIPS specific mdebug section. */ |
| 80 | .mdebug : { *(.mdebug) } |
Daniel Schwierzeck | 79fd7e6 | 2013-10-11 17:46:59 +0200 | [diff] [blame] | 81 | |
Daniel Schwierzeck | 2fdadc0 | 2019-01-06 20:42:43 +0100 | [diff] [blame] | 82 | /* Stabs debugging sections. */ |
| 83 | .stab 0 : { *(.stab) } |
| 84 | .stabstr 0 : { *(.stabstr) } |
| 85 | .stab.excl 0 : { *(.stab.excl) } |
| 86 | .stab.exclstr 0 : { *(.stab.exclstr) } |
| 87 | .stab.index 0 : { *(.stab.index) } |
| 88 | .stab.indexstr 0 : { *(.stab.indexstr) } |
| 89 | .comment 0 : { *(.comment) } |
Daniel Schwierzeck | 79fd7e6 | 2013-10-11 17:46:59 +0200 | [diff] [blame] | 90 | |
Daniel Schwierzeck | 2fdadc0 | 2019-01-06 20:42:43 +0100 | [diff] [blame] | 91 | /* |
| 92 | * DWARF debug sections. |
| 93 | * Symbols in the DWARF debugging sections are relative to |
| 94 | * the beginning of the section so we begin them at 0. |
| 95 | */ |
| 96 | /* DWARF 1 */ |
| 97 | .debug 0 : { *(.debug) } |
| 98 | .line 0 : { *(.line) } |
| 99 | /* GNU DWARF 1 extensions */ |
| 100 | .debug_srcinfo 0 : { *(.debug_srcinfo) } |
| 101 | .debug_sfnames 0 : { *(.debug_sfnames) } |
| 102 | /* DWARF 1.1 and DWARF 2 */ |
| 103 | .debug_aranges 0 : { *(.debug_aranges) } |
| 104 | .debug_pubnames 0 : { *(.debug_pubnames) } |
| 105 | /* DWARF 2 */ |
| 106 | .debug_info 0 : { |
| 107 | *(.debug_info |
| 108 | .gnu.linkonce.wi.*) |
Daniel Schwierzeck | 79fd7e6 | 2013-10-11 17:46:59 +0200 | [diff] [blame] | 109 | } |
Daniel Schwierzeck | 2fdadc0 | 2019-01-06 20:42:43 +0100 | [diff] [blame] | 110 | .debug_abbrev 0 : { *(.debug_abbrev) } |
| 111 | .debug_line 0 : { *(.debug_line) } |
| 112 | .debug_frame 0 : { *(.debug_frame) } |
| 113 | .debug_str 0 : { *(.debug_str) } |
| 114 | .debug_loc 0 : { *(.debug_loc) } |
| 115 | .debug_macinfo 0 : { *(.debug_macinfo) } |
| 116 | .debug_pubtypes 0 : { *(.debug_pubtypes) } |
| 117 | /* DWARF 3 */ |
| 118 | .debug_ranges 0 : { *(.debug_ranges) } |
| 119 | /* SGI/MIPS DWARF 2 extensions */ |
| 120 | .debug_weaknames 0 : { *(.debug_weaknames) } |
| 121 | .debug_funcnames 0 : { *(.debug_funcnames) } |
| 122 | .debug_typenames 0 : { *(.debug_typenames) } |
| 123 | .debug_varnames 0 : { *(.debug_varnames) } |
| 124 | /* GNU DWARF 2 extensions */ |
| 125 | .debug_gnu_pubnames 0 : { *(.debug_gnu_pubnames) } |
| 126 | .debug_gnu_pubtypes 0 : { *(.debug_gnu_pubtypes) } |
| 127 | /* DWARF 4 */ |
| 128 | .debug_types 0 : { *(.debug_types) } |
| 129 | /* DWARF 5 */ |
| 130 | .debug_macro 0 : { *(.debug_macro) } |
| 131 | .debug_addr 0 : { *(.debug_addr) } |
Daniel Schwierzeck | 79fd7e6 | 2013-10-11 17:46:59 +0200 | [diff] [blame] | 132 | |
Daniel Schwierzeck | 2fdadc0 | 2019-01-06 20:42:43 +0100 | [diff] [blame] | 133 | /DISCARD/ : { |
| 134 | /* ABI crap starts here */ |
| 135 | *(.MIPS.abiflags) |
| 136 | *(.MIPS.options) |
| 137 | *(.options) |
| 138 | *(.pdr) |
| 139 | *(.reginfo) |
| 140 | *(.eh_frame) |
Gabor Juhos | 0ba8926 | 2013-02-12 22:22:13 +0100 | [diff] [blame] | 141 | } |
Gabor Juhos | cb5dbca | 2013-01-30 04:31:52 +0000 | [diff] [blame] | 142 | } |