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