blob: 8588d7c8ad52b706aaf51a0503bae472d5a0c8aa [file] [log] [blame]
Tom Rini10e47792018-05-06 17:58:06 -04001/* SPDX-License-Identifier: GPL-2.0+ */
Mingkai Hu59fd9e22009-09-22 14:53:10 +08002/*
3 * (C) Copyright 2006
4 * Wolfgang Denk, DENX Software Engineering, wd@denx.de
5 *
6 * Copyright 2009 Freescale Semiconductor, Inc.
Mingkai Hu59fd9e22009-09-22 14:53:10 +08007 */
8
Masahiro Yamadacd1b58e2014-04-28 10:17:10 +09009#include "config.h"
Dipen Dudhat9eae0832011-03-22 09:27:39 +053010
Mingkai Hu59fd9e22009-09-22 14:53:10 +080011OUTPUT_ARCH(powerpc)
12SECTIONS
13{
14 . = 0xfff00000;
15 .text : {
Haiying Wang9ac755b2010-11-10 14:32:36 -050016 *(.text*)
Stefan Roese88fbf932010-04-15 16:07:28 +020017 }
Mingkai Hu59fd9e22009-09-22 14:53:10 +080018 _etext = .;
19
20 .reloc : {
21 _GOT2_TABLE_ = .;
Haiying Wang9ac755b2010-11-10 14:32:36 -050022 KEEP(*(.got2))
Scott Wood4ede0222012-05-01 16:37:57 -050023 KEEP(*(.got))
Mingkai Hu59fd9e22009-09-22 14:53:10 +080024 _FIXUP_TABLE_ = .;
Haiying Wang9ac755b2010-11-10 14:32:36 -050025 KEEP(*(.fixup))
Mingkai Hu59fd9e22009-09-22 14:53:10 +080026 }
Scott Wood4ede0222012-05-01 16:37:57 -050027 __got2_entries = ((_GLOBAL_OFFSET_TABLE_ - _GOT2_TABLE_) >> 2) - 1;
Mingkai Hu59fd9e22009-09-22 14:53:10 +080028 __fixup_entries = (. - _FIXUP_TABLE_) >> 2;
29
30 . = ALIGN(8);
31 .data : {
32 *(.rodata*)
33 *(.data*)
34 *(.sdata*)
35 }
36 _edata = .;
37
Marek Vasut607092a2012-10-12 10:27:03 +000038 .u_boot_list : {
Albert ARIBAUDc24895e2013-02-25 00:59:00 +000039 KEEP(*(SORT(.u_boot_list*)));
Marek Vasut607092a2012-10-12 10:27:03 +000040 }
41
Mingkai Hu59fd9e22009-09-22 14:53:10 +080042 . = ALIGN(8);
43 __init_begin = .;
44 __init_end = .;
Dipen Dudhat9eae0832011-03-22 09:27:39 +053045#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 Wang9ac755b2010-11-10 14:32:36 -050057 KEEP(*(.resetvec))
Mingkai Hu59fd9e22009-09-22 14:53:10 +080058 } = 0xffff
59
60 __bss_start = .;
61 .bss : {
Haiying Wang9ac755b2010-11-10 14:32:36 -050062 *(.sbss*)
63 *(.bss*)
Mingkai Hu59fd9e22009-09-22 14:53:10 +080064 }
Simon Glassed70c8f2013-03-14 06:54:53 +000065 __bss_end = .;
Mingkai Hu59fd9e22009-09-22 14:53:10 +080066}
Dipen Dudhat9eae0832011-03-22 09:27:39 +053067ASSERT(__init_end <= (0xfff00000 + RESET_VECTOR_OFFSET), "NAND bootstrap too big");