Wolfgang Denk | d79de1d | 2013-07-08 09:37:19 +0200 | [diff] [blame] | 1 | /* |
Masahiro Yamada | 8ac041e | 2014-06-20 14:58:22 +0900 | [diff] [blame] | 2 | * (C) Copyright 2007-2008 |
Daniel Hellstrom | ce43fed | 2008-03-28 10:06:52 +0100 | [diff] [blame] | 3 | * Daniel Hellstrom, Gaisler Research, daniel@gaisler.com. |
| 4 | * |
Wolfgang Denk | d79de1d | 2013-07-08 09:37:19 +0200 | [diff] [blame] | 5 | * SPDX-License-Identifier: GPL-2.0+ |
Daniel Hellstrom | ce43fed | 2008-03-28 10:06:52 +0100 | [diff] [blame] | 6 | */ |
| 7 | |
| 8 | OUTPUT_FORMAT("elf32-sparc", "elf32-sparc", "elf32-sparc") |
| 9 | OUTPUT_ARCH(sparc) |
| 10 | ENTRY(_start) |
| 11 | SECTIONS |
| 12 | { |
| 13 | |
| 14 | /* Read-only sections, merged into text segment: */ |
| 15 | . = + SIZEOF_HEADERS; |
| 16 | .interp : { *(.interp) } |
| 17 | .hash : { *(.hash) } |
| 18 | .dynsym : { *(.dynsym) } |
| 19 | .dynstr : { *(.dynstr) } |
| 20 | .rel.text : { *(.rel.text) } |
| 21 | .rela.text : { *(.rela.text) } |
| 22 | .rel.data : { *(.rel.data) } |
| 23 | .rela.data : { *(.rela.data) } |
| 24 | .rel.rodata : { *(.rel.rodata) } |
| 25 | .rela.rodata : { *(.rela.rodata) } |
| 26 | .rel.got : { *(.rel.got) } |
| 27 | .rela.got : { *(.rela.got) } |
| 28 | .rel.ctors : { *(.rel.ctors) } |
| 29 | .rela.ctors : { *(.rela.ctors) } |
| 30 | .rel.dtors : { *(.rel.dtors) } |
| 31 | .rela.dtors : { *(.rela.dtors) } |
| 32 | .rel.bss : { *(.rel.bss) } |
| 33 | .rela.bss : { *(.rela.bss) } |
| 34 | .rel.plt : { *(.rel.plt) } |
| 35 | .rela.plt : { *(.rela.plt) } |
| 36 | .init : { *(.init) } |
| 37 | .plt : { *(.plt) } |
| 38 | |
| 39 | .text : { |
| 40 | _load_addr = .; |
| 41 | _text = .; |
| 42 | |
| 43 | *(.start) |
Masahiro Yamada | 8ac041e | 2014-06-20 14:58:22 +0900 | [diff] [blame] | 44 | */start.o (.text) |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 45 | /* 8k is the same as the PROM offset from end of main memory, (CONFIG_SYS_PROM_SIZE) */ |
Daniel Hellstrom | ce43fed | 2008-03-28 10:06:52 +0100 | [diff] [blame] | 46 | . = ALIGN(8192); |
| 47 | /* PROM CODE, Will be relocated to the end of memory, |
| 48 | * no global data accesses please. |
| 49 | */ |
| 50 | __prom_start = .; |
| 51 | *(.prom.pgt) |
| 52 | *(.prom.data) |
| 53 | *(.prom.text) |
| 54 | . = ALIGN(16); |
| 55 | __prom_end = .; |
| 56 | *(.text) |
| 57 | *(.fixup) |
| 58 | *(.gnu.warning) |
| 59 | /* *(.got1)*/ |
| 60 | . = ALIGN(16); |
Daniel Hellstrom | ce43fed | 2008-03-28 10:06:52 +0100 | [diff] [blame] | 61 | *(.eh_frame) |
Trent Piepho | 4438e5e | 2009-02-18 15:22:05 -0800 | [diff] [blame] | 62 | *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*))) |
Daniel Hellstrom | ce43fed | 2008-03-28 10:06:52 +0100 | [diff] [blame] | 63 | } |
| 64 | . = ALIGN(4); |
| 65 | _etext = .; |
| 66 | |
| 67 | /* CMD Table */ |
| 68 | |
Daniel Hellstrom | ce43fed | 2008-03-28 10:06:52 +0100 | [diff] [blame] | 69 | |
Marek Vasut | 607092a | 2012-10-12 10:27:03 +0000 | [diff] [blame] | 70 | . = ALIGN(4); |
| 71 | .u_boot_list : { |
Albert ARIBAUD | c24895e | 2013-02-25 00:59:00 +0000 | [diff] [blame] | 72 | KEEP(*(SORT(.u_boot_list*))); |
Marek Vasut | 607092a | 2012-10-12 10:27:03 +0000 | [diff] [blame] | 73 | } |
| 74 | |
Daniel Hellstrom | ce43fed | 2008-03-28 10:06:52 +0100 | [diff] [blame] | 75 | .data : |
| 76 | { |
| 77 | *(.data) |
| 78 | *(.data1) |
| 79 | *(.data.rel) |
| 80 | *(.data.rel.*) |
| 81 | *(.sdata) |
| 82 | *(.sdata2) |
| 83 | *(.dynamic) |
| 84 | CONSTRUCTORS |
| 85 | } |
| 86 | _edata = .; |
| 87 | PROVIDE (edata = .); |
| 88 | |
| 89 | . = ALIGN(4); |
| 90 | __got_start = .; |
| 91 | .got : { |
| 92 | *(.got) |
| 93 | /* *(.data.rel) |
| 94 | *(.data.rel.local)*/ |
| 95 | . = ALIGN(16); |
| 96 | } |
| 97 | __got_end = .; |
| 98 | |
| 99 | /* .data.rel : { } */ |
| 100 | |
| 101 | |
| 102 | . = ALIGN(4096); |
| 103 | __init_begin = .; |
| 104 | .text.init : { *(.text.init) } |
| 105 | .data.init : { *(.data.init) } |
| 106 | . = ALIGN(4096); |
| 107 | __init_end = .; |
| 108 | |
| 109 | __bss_start = .; |
| 110 | .bss : |
| 111 | { |
| 112 | *(.sbss) *(.scommon) |
| 113 | *(.dynbss) |
| 114 | *(.bss) |
| 115 | *(COMMON) |
| 116 | . = ALIGN(16); /* to speed clearing of bss up */ |
| 117 | } |
| 118 | __bss_end = . ; |
Simon Glass | ed70c8f | 2013-03-14 06:54:53 +0000 | [diff] [blame] | 119 | __bss_end = . ; |
Daniel Hellstrom | ce43fed | 2008-03-28 10:06:52 +0100 | [diff] [blame] | 120 | PROVIDE (end = .); |
| 121 | |
| 122 | /* Relocated into main memory */ |
| 123 | |
| 124 | /* Start of main memory */ |
| 125 | /*. = 0x40000000;*/ |
| 126 | |
| 127 | .stack (NOLOAD) : { *(.stack) } |
| 128 | |
| 129 | /* PROM CODE */ |
| 130 | |
| 131 | /* global data in RAM passed to kernel after booting */ |
| 132 | |
| 133 | |
| 134 | .stab 0 : { *(.stab) } |
| 135 | .stabstr 0 : { *(.stabstr) } |
| 136 | .stab.excl 0 : { *(.stab.excl) } |
| 137 | .stab.exclstr 0 : { *(.stab.exclstr) } |
| 138 | .stab.index 0 : { *(.stab.index) } |
| 139 | .stab.indexstr 0 : { *(.stab.indexstr) } |
| 140 | .comment 0 : { *(.comment) } |
| 141 | |
| 142 | } |