Andre Schwarz | 3f4bd65 | 2010-04-01 21:26:55 +0200 | [diff] [blame] | 1 | /* |
| 2 | * (C) Copyright 2003-2004 |
| 3 | * Wolfgang Denk, DENX Software Engineering, wd@denx.de. |
| 4 | * (C) Copyright 2010 |
| 5 | * André Schwarz, Matrix Vision GmbH, as@matrix-vision.de |
| 6 | * |
| 7 | * See file CREDITS for list of people who contributed to this |
| 8 | * project. |
| 9 | * |
| 10 | * This program is free software; you can redistribute it and/or |
| 11 | * modify it under the terms of the GNU General Public License as |
| 12 | * published by the Free Software Foundation; either version 2 of |
| 13 | * the License, or (at your option) any later version. |
| 14 | * |
| 15 | * This program is distributed in the hope that it will be useful, |
| 16 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 17 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 18 | * GNU General Public License for more details. |
| 19 | * |
| 20 | * You should have received a copy of the GNU General Public License |
| 21 | * along with this program; if not, write to the Free Software |
| 22 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, |
| 23 | * MA 02111-1307 USA |
| 24 | */ |
| 25 | |
| 26 | OUTPUT_ARCH(powerpc) |
| 27 | |
| 28 | SECTIONS |
| 29 | { |
| 30 | /* Read-only sections, merged into text segment: */ |
Andre Schwarz | 3f4bd65 | 2010-04-01 21:26:55 +0200 | [diff] [blame] | 31 | .text : |
| 32 | { |
| 33 | /* WARNING - the following is hand-optimized to fit within */ |
| 34 | /* the first two sectors (=8KB) of our S29GL flash chip */ |
Wolfgang Denk | 01fd915 | 2010-11-23 13:20:22 +0100 | [diff] [blame] | 35 | arch/powerpc/cpu/mpc5xxx/start.o (.text*) |
| 36 | arch/powerpc/cpu/mpc5xxx/traps.o (.text*) |
| 37 | board/matrix_vision/common/libmatrix_vision.o (.text*) |
Andre Schwarz | 3f4bd65 | 2010-04-01 21:26:55 +0200 | [diff] [blame] | 38 | |
| 39 | /* This is only needed to force failure if size of above code will ever */ |
| 40 | /* increase and grow into reserved space. */ |
| 41 | . = ALIGN(0x2000); /* location counter has to be 0x4000 now */ |
| 42 | . += 0x4000; /* ->0x8000, i.e. move to env_offset */ |
| 43 | |
| 44 | . = env_offset; /* ld error as soon as above ALIGN misplaces lc */ |
| 45 | common/env_embedded.o (.ppcenv) |
| 46 | |
Wolfgang Denk | 01fd915 | 2010-11-23 13:20:22 +0100 | [diff] [blame] | 47 | *(.text*) |
Andre Schwarz | 3f4bd65 | 2010-04-01 21:26:55 +0200 | [diff] [blame] | 48 | . = ALIGN(16); |
Andre Schwarz | 3f4bd65 | 2010-04-01 21:26:55 +0200 | [diff] [blame] | 49 | *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*))) |
| 50 | } |
Andre Schwarz | 3f4bd65 | 2010-04-01 21:26:55 +0200 | [diff] [blame] | 51 | |
| 52 | /* Read-write section, merged into data segment: */ |
| 53 | . = (. + 0x0FFF) & 0xFFFFF000; |
| 54 | _erotext = .; |
| 55 | PROVIDE (erotext = .); |
| 56 | .reloc : |
| 57 | { |
Andre Schwarz | 3f4bd65 | 2010-04-01 21:26:55 +0200 | [diff] [blame] | 58 | _GOT2_TABLE_ = .; |
Wolfgang Denk | 01fd915 | 2010-11-23 13:20:22 +0100 | [diff] [blame] | 59 | KEEP(*(.got2)) |
Joakim Tjernlund | a65f8c8 | 2011-04-20 14:22:59 +0200 | [diff] [blame] | 60 | KEEP(*(.got)) |
| 61 | PROVIDE(_GLOBAL_OFFSET_TABLE_ = . + 4); |
Andre Schwarz | 3f4bd65 | 2010-04-01 21:26:55 +0200 | [diff] [blame] | 62 | _FIXUP_TABLE_ = .; |
Wolfgang Denk | 01fd915 | 2010-11-23 13:20:22 +0100 | [diff] [blame] | 63 | KEEP(*(.fixup)) |
Andre Schwarz | 3f4bd65 | 2010-04-01 21:26:55 +0200 | [diff] [blame] | 64 | } |
Joakim Tjernlund | f909e70 | 2011-04-24 10:29:32 +0200 | [diff] [blame^] | 65 | __got2_entries = ((_GLOBAL_OFFSET_TABLE_ - _GOT2_TABLE_) >> 2) - 1; |
Andre Schwarz | 3f4bd65 | 2010-04-01 21:26:55 +0200 | [diff] [blame] | 66 | __fixup_entries = (. - _FIXUP_TABLE_) >> 2; |
| 67 | |
| 68 | .data : |
| 69 | { |
Wolfgang Denk | 01fd915 | 2010-11-23 13:20:22 +0100 | [diff] [blame] | 70 | *(.data*) |
| 71 | *(.sdata*) |
Andre Schwarz | 3f4bd65 | 2010-04-01 21:26:55 +0200 | [diff] [blame] | 72 | } |
| 73 | _edata = .; |
| 74 | PROVIDE (edata = .); |
| 75 | |
| 76 | . = .; |
| 77 | __u_boot_cmd_start = .; |
| 78 | .u_boot_cmd : { *(.u_boot_cmd) } |
| 79 | __u_boot_cmd_end = .; |
| 80 | |
| 81 | |
| 82 | . = .; |
| 83 | __start___ex_table = .; |
| 84 | __ex_table : { *(__ex_table) } |
| 85 | __stop___ex_table = .; |
| 86 | |
| 87 | . = ALIGN(4096); |
| 88 | __init_begin = .; |
| 89 | .text.init : { *(.text.init) } |
| 90 | .data.init : { *(.data.init) } |
| 91 | . = ALIGN(4096); |
| 92 | __init_end = .; |
| 93 | |
| 94 | __bss_start = .; |
| 95 | .bss (NOLOAD) : |
| 96 | { |
Wolfgang Denk | 01fd915 | 2010-11-23 13:20:22 +0100 | [diff] [blame] | 97 | *(.bss*) |
| 98 | *(.sbss*) |
Andre Schwarz | 3f4bd65 | 2010-04-01 21:26:55 +0200 | [diff] [blame] | 99 | . = ALIGN(4); |
| 100 | } |
Po-Yu Chuang | cedbf4b | 2011-03-01 22:59:59 +0000 | [diff] [blame] | 101 | __bss_end__ = . ; |
Andre Schwarz | 3f4bd65 | 2010-04-01 21:26:55 +0200 | [diff] [blame] | 102 | PROVIDE (end = .); |
| 103 | } |