Lunsheng Wang | 61e6195 | 2005-07-29 10:20:29 -0500 | [diff] [blame] | 1 | /* |
| 2 | * (C) Copyright 2002,2003, Motorola,Inc. |
| 3 | * |
| 4 | * See file CREDITS for list of people who contributed to this |
| 5 | * project. |
| 6 | * |
| 7 | * This program is free software; you can redistribute it and/or |
| 8 | * modify it under the terms of the GNU General Public License as |
| 9 | * published by the Free Software Foundation; either version 2 of |
| 10 | * the License, or (at your option) any later version. |
| 11 | * |
| 12 | * This program is distributed in the hope that it will be useful, |
| 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 15 | * GNU General Public License for more details. |
| 16 | * |
| 17 | * You should have received a copy of the GNU General Public License |
| 18 | * along with this program; if not, write to the Free Software |
| 19 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, |
| 20 | * MA 02111-1307 USA |
| 21 | */ |
| 22 | |
| 23 | /* Assumes that the size of u-boot is less than 512K and the |
| 24 | * start address is aligned on a 512K block. |
| 25 | * Boot page and reset vector is put at that end of the 512K block. */ |
| 26 | |
| 27 | OUTPUT_ARCH(powerpc) |
Lunsheng Wang | 61e6195 | 2005-07-29 10:20:29 -0500 | [diff] [blame] | 28 | /* Do we need any of these for elf? |
| 29 | __DYNAMIC = 0; */ |
| 30 | SECTIONS |
| 31 | { |
| 32 | /* Read-only sections, merged into text segment: */ |
| 33 | .interp : { *(.interp) } |
| 34 | .hash : { *(.hash) } |
| 35 | .dynsym : { *(.dynsym) } |
| 36 | .dynstr : { *(.dynstr) } |
| 37 | .rel.text : { *(.rel.text) } |
Wolfgang Denk | a1be476 | 2008-05-20 16:00:29 +0200 | [diff] [blame] | 38 | .rela.text : { *(.rela.text) } |
Lunsheng Wang | 61e6195 | 2005-07-29 10:20:29 -0500 | [diff] [blame] | 39 | .rel.data : { *(.rel.data) } |
Wolfgang Denk | a1be476 | 2008-05-20 16:00:29 +0200 | [diff] [blame] | 40 | .rela.data : { *(.rela.data) } |
| 41 | .rel.rodata : { *(.rel.rodata) } |
| 42 | .rela.rodata : { *(.rela.rodata) } |
Lunsheng Wang | 61e6195 | 2005-07-29 10:20:29 -0500 | [diff] [blame] | 43 | .rel.got : { *(.rel.got) } |
| 44 | .rela.got : { *(.rela.got) } |
| 45 | .rel.ctors : { *(.rel.ctors) } |
| 46 | .rela.ctors : { *(.rela.ctors) } |
| 47 | .rel.dtors : { *(.rel.dtors) } |
| 48 | .rela.dtors : { *(.rela.dtors) } |
| 49 | .rel.bss : { *(.rel.bss) } |
| 50 | .rela.bss : { *(.rela.bss) } |
| 51 | .rel.plt : { *(.rel.plt) } |
| 52 | .rela.plt : { *(.rela.plt) } |
| 53 | .init : { *(.init) } |
| 54 | .plt : { *(.plt) } |
| 55 | .text : |
| 56 | { |
| 57 | cpu/mpc85xx/start.o (.text) |
Lunsheng Wang | 61e6195 | 2005-07-29 10:20:29 -0500 | [diff] [blame] | 58 | cpu/mpc85xx/traps.o (.text) |
| 59 | cpu/mpc85xx/interrupts.o (.text) |
| 60 | cpu/mpc85xx/cpu_init.o (.text) |
| 61 | cpu/mpc85xx/cpu.o (.text) |
| 62 | cpu/mpc85xx/speed.o (.text) |
| 63 | cpu/mpc85xx/pci.o (.text) |
| 64 | common/dlmalloc.o (.text) |
| 65 | lib_generic/crc32.o (.text) |
| 66 | lib_ppc/extable.o (.text) |
| 67 | lib_generic/zlib.o (.text) |
| 68 | *(.text) |
| 69 | *(.fixup) |
| 70 | *(.got1) |
| 71 | } |
| 72 | _etext = .; |
| 73 | PROVIDE (etext = .); |
| 74 | .rodata : |
| 75 | { |
Wolfgang Denk | aaa7c00 | 2005-12-12 16:06:05 +0100 | [diff] [blame] | 76 | *(.eh_frame) |
Trent Piepho | 4438e5e | 2009-02-18 15:22:05 -0800 | [diff] [blame^] | 77 | *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*))) |
Lunsheng Wang | 61e6195 | 2005-07-29 10:20:29 -0500 | [diff] [blame] | 78 | } |
| 79 | .fini : { *(.fini) } =0 |
| 80 | .ctors : { *(.ctors) } |
| 81 | .dtors : { *(.dtors) } |
| 82 | |
| 83 | /* Read-write section, merged into data segment: */ |
| 84 | . = (. + 0x00FF) & 0xFFFFFF00; |
| 85 | _erotext = .; |
| 86 | PROVIDE (erotext = .); |
| 87 | .reloc : |
| 88 | { |
| 89 | *(.got) |
| 90 | _GOT2_TABLE_ = .; |
| 91 | *(.got2) |
| 92 | _FIXUP_TABLE_ = .; |
| 93 | *(.fixup) |
| 94 | } |
| 95 | __got2_entries = (_FIXUP_TABLE_ - _GOT2_TABLE_) >> 2; |
| 96 | __fixup_entries = (. - _FIXUP_TABLE_) >> 2; |
| 97 | |
| 98 | .data : |
| 99 | { |
| 100 | *(.data) |
| 101 | *(.data1) |
| 102 | *(.sdata) |
| 103 | *(.sdata2) |
| 104 | *(.dynamic) |
| 105 | CONSTRUCTORS |
| 106 | } |
| 107 | _edata = .; |
| 108 | PROVIDE (edata = .); |
| 109 | |
Wolfgang Denk | 5dd2c65 | 2005-08-31 12:28:00 +0200 | [diff] [blame] | 110 | . = .; |
Lunsheng Wang | 61e6195 | 2005-07-29 10:20:29 -0500 | [diff] [blame] | 111 | __u_boot_cmd_start = .; |
| 112 | .u_boot_cmd : { *(.u_boot_cmd) } |
| 113 | __u_boot_cmd_end = .; |
| 114 | |
Wolfgang Denk | 5dd2c65 | 2005-08-31 12:28:00 +0200 | [diff] [blame] | 115 | . = .; |
Lunsheng Wang | 61e6195 | 2005-07-29 10:20:29 -0500 | [diff] [blame] | 116 | __start___ex_table = .; |
| 117 | __ex_table : { *(__ex_table) } |
| 118 | __stop___ex_table = .; |
| 119 | |
| 120 | . = ALIGN(256); |
| 121 | __init_begin = .; |
| 122 | .text.init : { *(.text.init) } |
| 123 | .data.init : { *(.data.init) } |
| 124 | . = ALIGN(256); |
| 125 | __init_end = .; |
| 126 | |
| 127 | __bss_start = .; |
Wolfgang Denk | 828a978 | 2008-01-12 20:31:39 +0100 | [diff] [blame] | 128 | .bss (NOLOAD) : |
Lunsheng Wang | 61e6195 | 2005-07-29 10:20:29 -0500 | [diff] [blame] | 129 | { |
| 130 | *(.sbss) *(.scommon) |
| 131 | *(.dynbss) |
| 132 | *(.bss) |
| 133 | *(COMMON) |
Selvamuthukumar | d2454ba | 2008-10-16 22:54:03 +0530 | [diff] [blame] | 134 | . = ALIGN(4); |
Lunsheng Wang | 61e6195 | 2005-07-29 10:20:29 -0500 | [diff] [blame] | 135 | } |
| 136 | _end = . ; |
| 137 | PROVIDE (end = .); |
| 138 | |
| 139 | . = (. & 0xFFF80000) + 0x0007F000; |
| 140 | .bootpg : |
| 141 | { |
| 142 | cpu/mpc85xx/start.o (.bootpg) |
Lunsheng Wang | 61e6195 | 2005-07-29 10:20:29 -0500 | [diff] [blame] | 143 | } = 0xffff |
| 144 | |
| 145 | . = (. & 0xFFF80000) + 0x0007FFFC; |
| 146 | .resetvec : |
| 147 | { |
| 148 | *(.resetvec) |
| 149 | } = 0xffff |
| 150 | |
| 151 | } |