Stefan Roese | 18d156e | 2007-06-01 16:18:17 +0200 | [diff] [blame] | 1 | /* |
| 2 | * (C) Copyright 2007 |
| 3 | * Wolfgang Denk, DENX Software Engineering, wd@denx.de. |
| 4 | * |
Wolfgang Denk | 1a45966 | 2013-07-08 09:37:19 +0200 | [diff] [blame] | 5 | * SPDX-License-Identifier: GPL-2.0+ |
Stefan Roese | 18d156e | 2007-06-01 16:18:17 +0200 | [diff] [blame] | 6 | */ |
| 7 | |
| 8 | OUTPUT_ARCH(powerpc) |
Stefan Roese | 18d156e | 2007-06-01 16:18:17 +0200 | [diff] [blame] | 9 | SECTIONS |
| 10 | { |
| 11 | /* Read-only sections, merged into text segment: */ |
| 12 | . = + SIZEOF_HEADERS; |
Stefan Roese | 18d156e | 2007-06-01 16:18:17 +0200 | [diff] [blame] | 13 | .text : |
| 14 | { |
| 15 | /* WARNING - the following is hand-optimized to fit within */ |
| 16 | /* the sector layout of our flash chips! XXX FIXME XXX */ |
| 17 | |
Wolfgang Denk | ee8028b | 2010-11-21 20:55:42 +0100 | [diff] [blame] | 18 | arch/powerpc/cpu/ppc4xx/start.o (.text*) |
| 19 | board/amcc/bamboo/init.o (.text*) |
Stefan Roese | 18d156e | 2007-06-01 16:18:17 +0200 | [diff] [blame] | 20 | |
| 21 | /* Align to next NAND block */ |
| 22 | . = ALIGN(0x4000); |
Jean-Christophe PLAGNIOL-VILLARD | 0cf4fd3 | 2008-09-10 22:48:01 +0200 | [diff] [blame] | 23 | common/env_embedded.o (.ppcenv) |
Stefan Roese | 18d156e | 2007-06-01 16:18:17 +0200 | [diff] [blame] | 24 | /* Keep some space here for redundant env and potential bad env blocks */ |
| 25 | . = ALIGN(0x10000); |
| 26 | |
Wolfgang Denk | ee8028b | 2010-11-21 20:55:42 +0100 | [diff] [blame] | 27 | *(.text*) |
Stefan Roese | 18d156e | 2007-06-01 16:18:17 +0200 | [diff] [blame] | 28 | } |
| 29 | _etext = .; |
| 30 | PROVIDE (etext = .); |
| 31 | .rodata : |
| 32 | { |
Trent Piepho | f62fb99 | 2009-02-18 15:22:05 -0800 | [diff] [blame] | 33 | *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*))) |
Stefan Roese | 18d156e | 2007-06-01 16:18:17 +0200 | [diff] [blame] | 34 | } |
Stefan Roese | 18d156e | 2007-06-01 16:18:17 +0200 | [diff] [blame] | 35 | |
| 36 | /* Read-write section, merged into data segment: */ |
| 37 | . = (. + 0x00FF) & 0xFFFFFF00; |
| 38 | _erotext = .; |
| 39 | PROVIDE (erotext = .); |
| 40 | .reloc : |
| 41 | { |
Wolfgang Denk | ee8028b | 2010-11-21 20:55:42 +0100 | [diff] [blame] | 42 | KEEP(*(.got)) |
Stefan Roese | 18d156e | 2007-06-01 16:18:17 +0200 | [diff] [blame] | 43 | _GOT2_TABLE_ = .; |
Wolfgang Denk | ee8028b | 2010-11-21 20:55:42 +0100 | [diff] [blame] | 44 | KEEP(*(.got2)) |
Stefan Roese | 18d156e | 2007-06-01 16:18:17 +0200 | [diff] [blame] | 45 | _FIXUP_TABLE_ = .; |
Wolfgang Denk | ee8028b | 2010-11-21 20:55:42 +0100 | [diff] [blame] | 46 | KEEP(*(.fixup)) |
Stefan Roese | 18d156e | 2007-06-01 16:18:17 +0200 | [diff] [blame] | 47 | } |
| 48 | __got2_entries = (_FIXUP_TABLE_ - _GOT2_TABLE_) >>2; |
| 49 | __fixup_entries = (. - _FIXUP_TABLE_)>>2; |
| 50 | |
| 51 | .data : |
| 52 | { |
Wolfgang Denk | ee8028b | 2010-11-21 20:55:42 +0100 | [diff] [blame] | 53 | *(.data*) |
| 54 | *(.sdata*) |
Stefan Roese | 18d156e | 2007-06-01 16:18:17 +0200 | [diff] [blame] | 55 | } |
| 56 | _edata = .; |
| 57 | PROVIDE (edata = .); |
| 58 | |
| 59 | . = .; |
Stefan Roese | 18d156e | 2007-06-01 16:18:17 +0200 | [diff] [blame] | 60 | |
Marek Vasut | 5567514 | 2012-10-12 10:27:03 +0000 | [diff] [blame] | 61 | .u_boot_list : { |
Albert ARIBAUD | ef123c5 | 2013-02-25 00:59:00 +0000 | [diff] [blame] | 62 | KEEP(*(SORT(.u_boot_list*))); |
Marek Vasut | 5567514 | 2012-10-12 10:27:03 +0000 | [diff] [blame] | 63 | } |
Stefan Roese | 18d156e | 2007-06-01 16:18:17 +0200 | [diff] [blame] | 64 | |
| 65 | . = .; |
| 66 | __start___ex_table = .; |
| 67 | __ex_table : { *(__ex_table) } |
| 68 | __stop___ex_table = .; |
| 69 | |
| 70 | . = ALIGN(256); |
| 71 | __init_begin = .; |
| 72 | .text.init : { *(.text.init) } |
| 73 | .data.init : { *(.data.init) } |
| 74 | . = ALIGN(256); |
| 75 | __init_end = .; |
| 76 | |
| 77 | __bss_start = .; |
Wolfgang Denk | 64134f0 | 2008-01-12 20:31:39 +0100 | [diff] [blame] | 78 | .bss (NOLOAD) : |
Stefan Roese | 18d156e | 2007-06-01 16:18:17 +0200 | [diff] [blame] | 79 | { |
Wolfgang Denk | ee8028b | 2010-11-21 20:55:42 +0100 | [diff] [blame] | 80 | *(.bss*) |
| 81 | *(.sbss*) |
Stefan Roese | 18d156e | 2007-06-01 16:18:17 +0200 | [diff] [blame] | 82 | *(COMMON) |
Selvamuthukumar | 9b827cf | 2008-10-16 22:54:03 +0530 | [diff] [blame] | 83 | . = ALIGN(4); |
Stefan Roese | 18d156e | 2007-06-01 16:18:17 +0200 | [diff] [blame] | 84 | } |
| 85 | |
Simon Glass | 3929fb0 | 2013-03-14 06:54:53 +0000 | [diff] [blame] | 86 | __bss_end = . ; |
Stefan Roese | 18d156e | 2007-06-01 16:18:17 +0200 | [diff] [blame] | 87 | PROVIDE (end = .); |
| 88 | } |