Stefan Roese | b79316f | 2005-08-15 12:31:23 +0200 | [diff] [blame] | 1 | /* |
| 2 | * (C) Copyright 2005 |
| 3 | * Wolfgang Denk, DENX Software Engineering, wd@denx.de. |
| 4 | * Travis B. Sawyer, Sandburst Corporation, tsawyer@sandburst.com |
| 5 | * |
| 6 | * See file CREDITS for list of people who contributed to this |
| 7 | * project. |
| 8 | * |
| 9 | * This program is free software; you can redistribute it and/or |
| 10 | * modify it under the terms of the GNU General Public License as |
| 11 | * published by the Free Software Foundation; either version 2 of |
| 12 | * the License, or (at your option) any later version. |
| 13 | * |
| 14 | * This program is distributed in the hope that it will be useful, |
| 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 17 | * GNU General Public License for more details. |
| 18 | * |
| 19 | * You should have received a copy of the GNU General Public License |
| 20 | * along with this program; if not, write to the Free Software |
| 21 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, |
| 22 | * MA 02111-1307 USA |
| 23 | */ |
| 24 | |
| 25 | OUTPUT_ARCH(powerpc) |
| 26 | SEARCH_DIR(/lib); SEARCH_DIR(/usr/lib); SEARCH_DIR(/usr/local/lib); SEARCH_DIR(/usr/local/powerpc-any-elf/lib); |
| 27 | /* Do we need any of these for elf? |
| 28 | __DYNAMIC = 0; */ |
| 29 | SECTIONS |
| 30 | { |
| 31 | .resetvec 0xFFFFFFFC : |
| 32 | { |
| 33 | *(.resetvec) |
| 34 | } = 0xffff |
| 35 | |
| 36 | .bootpg 0xFFFFF000 : |
| 37 | { |
| 38 | cpu/ppc4xx/start.o (.bootpg) |
| 39 | } = 0xffff |
| 40 | |
| 41 | /* Read-only sections, merged into text segment: */ |
| 42 | . = + SIZEOF_HEADERS; |
| 43 | .interp : { *(.interp) } |
| 44 | .hash : { *(.hash) } |
| 45 | .dynsym : { *(.dynsym) } |
| 46 | .dynstr : { *(.dynstr) } |
| 47 | .rel.text : { *(.rel.text) } |
| 48 | .rela.text : { *(.rela.text) } |
| 49 | .rel.data : { *(.rel.data) } |
| 50 | .rela.data : { *(.rela.data) } |
| 51 | .rel.rodata : { *(.rel.rodata) } |
| 52 | .rela.rodata : { *(.rela.rodata) } |
| 53 | .rel.got : { *(.rel.got) } |
| 54 | .rela.got : { *(.rela.got) } |
| 55 | .rel.ctors : { *(.rel.ctors) } |
| 56 | .rela.ctors : { *(.rela.ctors) } |
| 57 | .rel.dtors : { *(.rel.dtors) } |
| 58 | .rela.dtors : { *(.rela.dtors) } |
| 59 | .rel.bss : { *(.rel.bss) } |
| 60 | .rela.bss : { *(.rela.bss) } |
| 61 | .rel.plt : { *(.rel.plt) } |
| 62 | .rela.plt : { *(.rela.plt) } |
| 63 | .init : { *(.init) } |
| 64 | .plt : { *(.plt) } |
| 65 | .text : |
| 66 | { |
| 67 | /* WARNING - the following is hand-optimized to fit within */ |
| 68 | /* the sector layout of our flash chips! XXX FIXME XXX */ |
| 69 | |
| 70 | cpu/ppc4xx/start.o (.text) |
| 71 | board/sandburst/metrobox/init.o (.text) |
| 72 | cpu/ppc4xx/kgdb.o (.text) |
| 73 | cpu/ppc4xx/traps.o (.text) |
| 74 | cpu/ppc4xx/interrupts.o (.text) |
Stefan Roese | 882ae41 | 2007-10-22 15:44:39 +0200 | [diff] [blame] | 75 | cpu/ppc4xx/4xx_uart.o (.text) |
Stefan Roese | b79316f | 2005-08-15 12:31:23 +0200 | [diff] [blame] | 76 | cpu/ppc4xx/cpu_init.o (.text) |
| 77 | cpu/ppc4xx/speed.o (.text) |
Stefan Roese | d6c61aa | 2005-08-16 18:18:00 +0200 | [diff] [blame] | 78 | cpu/ppc4xx/4xx_enet.o (.text) |
Stefan Roese | b79316f | 2005-08-15 12:31:23 +0200 | [diff] [blame] | 79 | common/dlmalloc.o (.text) |
| 80 | lib_generic/crc32.o (.text) |
| 81 | lib_ppc/extable.o (.text) |
| 82 | lib_generic/zlib.o (.text) |
| 83 | |
| 84 | /* . = env_offset;*/ |
| 85 | /* common/environment.o(.text)*/ |
| 86 | |
| 87 | *(.text) |
| 88 | *(.fixup) |
| 89 | *(.got1) |
| 90 | } |
| 91 | _etext = .; |
| 92 | PROVIDE (etext = .); |
| 93 | .rodata : |
| 94 | { |
| 95 | *(.rodata) |
| 96 | *(.rodata1) |
| 97 | *(.rodata.str1.4) |
Wolfgang Denk | 7481266 | 2005-12-12 16:06:05 +0100 | [diff] [blame] | 98 | *(.eh_frame) |
Stefan Roese | b79316f | 2005-08-15 12:31:23 +0200 | [diff] [blame] | 99 | } |
| 100 | .fini : { *(.fini) } =0 |
| 101 | .ctors : { *(.ctors) } |
| 102 | .dtors : { *(.dtors) } |
| 103 | |
| 104 | /* Read-write section, merged into data segment: */ |
| 105 | . = (. + 0x00FF) & 0xFFFFFF00; |
| 106 | _erotext = .; |
| 107 | PROVIDE (erotext = .); |
| 108 | .reloc : |
| 109 | { |
| 110 | *(.got) |
| 111 | _GOT2_TABLE_ = .; |
| 112 | *(.got2) |
| 113 | _FIXUP_TABLE_ = .; |
| 114 | *(.fixup) |
| 115 | } |
| 116 | __got2_entries = (_FIXUP_TABLE_ - _GOT2_TABLE_) >>2; |
| 117 | __fixup_entries = (. - _FIXUP_TABLE_)>>2; |
| 118 | |
| 119 | .data : |
| 120 | { |
| 121 | *(.data) |
| 122 | *(.data1) |
| 123 | *(.sdata) |
| 124 | *(.sdata2) |
| 125 | *(.dynamic) |
| 126 | CONSTRUCTORS |
| 127 | } |
| 128 | _edata = .; |
| 129 | PROVIDE (edata = .); |
| 130 | |
Wolfgang Denk | 807d5d7 | 2005-08-31 12:28:00 +0200 | [diff] [blame] | 131 | . = .; |
Stefan Roese | b79316f | 2005-08-15 12:31:23 +0200 | [diff] [blame] | 132 | __u_boot_cmd_start = .; |
| 133 | .u_boot_cmd : { *(.u_boot_cmd) } |
| 134 | __u_boot_cmd_end = .; |
| 135 | |
| 136 | |
Wolfgang Denk | 807d5d7 | 2005-08-31 12:28:00 +0200 | [diff] [blame] | 137 | . = .; |
Stefan Roese | b79316f | 2005-08-15 12:31:23 +0200 | [diff] [blame] | 138 | __start___ex_table = .; |
| 139 | __ex_table : { *(__ex_table) } |
| 140 | __stop___ex_table = .; |
| 141 | |
| 142 | . = ALIGN(256); |
| 143 | __init_begin = .; |
| 144 | .text.init : { *(.text.init) } |
| 145 | .data.init : { *(.data.init) } |
| 146 | . = ALIGN(256); |
| 147 | __init_end = .; |
| 148 | |
| 149 | __bss_start = .; |
| 150 | .bss : |
| 151 | { |
| 152 | *(.sbss) *(.scommon) |
| 153 | *(.dynbss) |
| 154 | *(.bss) |
| 155 | *(COMMON) |
| 156 | } |
| 157 | _end = . ; |
| 158 | PROVIDE (end = .); |
| 159 | } |