Mingkai Hu | 59fd9e2 | 2009-09-22 14:53:10 +0800 | [diff] [blame] | 1 | /* |
| 2 | * (C) Copyright 2006 |
| 3 | * Wolfgang Denk, DENX Software Engineering, wd@denx.de |
| 4 | * |
| 5 | * Copyright 2009 Freescale Semiconductor, Inc. |
| 6 | * |
Wolfgang Denk | d79de1d | 2013-07-08 09:37:19 +0200 | [diff] [blame] | 7 | * SPDX-License-Identifier: GPL-2.0+ |
Mingkai Hu | 59fd9e2 | 2009-09-22 14:53:10 +0800 | [diff] [blame] | 8 | */ |
| 9 | |
Masahiro Yamada | cd1b58e | 2014-04-28 10:17:10 +0900 | [diff] [blame] | 10 | #include "config.h" |
Dipen Dudhat | 9eae083 | 2011-03-22 09:27:39 +0530 | [diff] [blame] | 11 | |
Mingkai Hu | 59fd9e2 | 2009-09-22 14:53:10 +0800 | [diff] [blame] | 12 | OUTPUT_ARCH(powerpc) |
| 13 | SECTIONS |
| 14 | { |
| 15 | . = 0xfff00000; |
| 16 | .text : { |
Haiying Wang | 9ac755b | 2010-11-10 14:32:36 -0500 | [diff] [blame] | 17 | *(.text*) |
Stefan Roese | 88fbf93 | 2010-04-15 16:07:28 +0200 | [diff] [blame] | 18 | } |
Mingkai Hu | 59fd9e2 | 2009-09-22 14:53:10 +0800 | [diff] [blame] | 19 | _etext = .; |
| 20 | |
| 21 | .reloc : { |
| 22 | _GOT2_TABLE_ = .; |
Haiying Wang | 9ac755b | 2010-11-10 14:32:36 -0500 | [diff] [blame] | 23 | KEEP(*(.got2)) |
Scott Wood | 4ede022 | 2012-05-01 16:37:57 -0500 | [diff] [blame] | 24 | KEEP(*(.got)) |
Mingkai Hu | 59fd9e2 | 2009-09-22 14:53:10 +0800 | [diff] [blame] | 25 | _FIXUP_TABLE_ = .; |
Haiying Wang | 9ac755b | 2010-11-10 14:32:36 -0500 | [diff] [blame] | 26 | KEEP(*(.fixup)) |
Mingkai Hu | 59fd9e2 | 2009-09-22 14:53:10 +0800 | [diff] [blame] | 27 | } |
Scott Wood | 4ede022 | 2012-05-01 16:37:57 -0500 | [diff] [blame] | 28 | __got2_entries = ((_GLOBAL_OFFSET_TABLE_ - _GOT2_TABLE_) >> 2) - 1; |
Mingkai Hu | 59fd9e2 | 2009-09-22 14:53:10 +0800 | [diff] [blame] | 29 | __fixup_entries = (. - _FIXUP_TABLE_) >> 2; |
| 30 | |
| 31 | . = ALIGN(8); |
| 32 | .data : { |
| 33 | *(.rodata*) |
| 34 | *(.data*) |
| 35 | *(.sdata*) |
| 36 | } |
| 37 | _edata = .; |
| 38 | |
Marek Vasut | 607092a | 2012-10-12 10:27:03 +0000 | [diff] [blame] | 39 | .u_boot_list : { |
Albert ARIBAUD | c24895e | 2013-02-25 00:59:00 +0000 | [diff] [blame] | 40 | KEEP(*(SORT(.u_boot_list*))); |
Marek Vasut | 607092a | 2012-10-12 10:27:03 +0000 | [diff] [blame] | 41 | } |
| 42 | |
Mingkai Hu | 59fd9e2 | 2009-09-22 14:53:10 +0800 | [diff] [blame] | 43 | . = ALIGN(8); |
| 44 | __init_begin = .; |
| 45 | __init_end = .; |
Dipen Dudhat | 9eae083 | 2011-03-22 09:27:39 +0530 | [diff] [blame] | 46 | #if defined(CONFIG_FSL_IFC) /* Restrict bootpg at 4K boundry for IFC */ |
| 47 | .bootpg ADDR(.text) + 0x1000 : |
| 48 | { |
| 49 | start.o (.bootpg) |
| 50 | } |
| 51 | #define RESET_VECTOR_OFFSET 0x1ffc /* IFC has 8K sram */ |
| 52 | #elif defined(CONFIG_FSL_ELBC) |
| 53 | #define RESET_VECTOR_OFFSET 0xffc /* LBC has 4k sram */ |
| 54 | #else |
| 55 | #error unknown NAND controller |
| 56 | #endif |
| 57 | .resetvec ADDR(.text) + RESET_VECTOR_OFFSET : { |
Haiying Wang | 9ac755b | 2010-11-10 14:32:36 -0500 | [diff] [blame] | 58 | KEEP(*(.resetvec)) |
Mingkai Hu | 59fd9e2 | 2009-09-22 14:53:10 +0800 | [diff] [blame] | 59 | } = 0xffff |
| 60 | |
| 61 | __bss_start = .; |
| 62 | .bss : { |
Haiying Wang | 9ac755b | 2010-11-10 14:32:36 -0500 | [diff] [blame] | 63 | *(.sbss*) |
| 64 | *(.bss*) |
Mingkai Hu | 59fd9e2 | 2009-09-22 14:53:10 +0800 | [diff] [blame] | 65 | } |
Simon Glass | ed70c8f | 2013-03-14 06:54:53 +0000 | [diff] [blame] | 66 | __bss_end = .; |
Mingkai Hu | 59fd9e2 | 2009-09-22 14:53:10 +0800 | [diff] [blame] | 67 | } |
Dipen Dudhat | 9eae083 | 2011-03-22 09:27:39 +0530 | [diff] [blame] | 68 | ASSERT(__init_end <= (0xfff00000 + RESET_VECTOR_OFFSET), "NAND bootstrap too big"); |