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