blob: 844f7e94f13eb1dd852a4fa9eafd0642ded102f0 [file] [log] [blame]
Mingkai Hu59fd9e22009-09-22 14:53:10 +08001/*
2 * (C) Copyright 2006
3 * Wolfgang Denk, DENX Software Engineering, wd@denx.de
4 *
5 * Copyright 2009 Freescale Semiconductor, Inc.
6 *
Wolfgang Denkd79de1d2013-07-08 09:37:19 +02007 * SPDX-License-Identifier: GPL-2.0+
Mingkai Hu59fd9e22009-09-22 14:53:10 +08008 */
9
Dipen Dudhat9eae0832011-03-22 09:27:39 +053010#include "config.h" /* CONFIG_BOARDDIR */
11
Mingkai Hu59fd9e22009-09-22 14:53:10 +080012OUTPUT_ARCH(powerpc)
13SECTIONS
14{
15 . = 0xfff00000;
16 .text : {
Haiying Wang9ac755b2010-11-10 14:32:36 -050017 *(.text*)
Stefan Roese88fbf932010-04-15 16:07:28 +020018 }
Mingkai Hu59fd9e22009-09-22 14:53:10 +080019 _etext = .;
20
21 .reloc : {
22 _GOT2_TABLE_ = .;
Haiying Wang9ac755b2010-11-10 14:32:36 -050023 KEEP(*(.got2))
Scott Wood4ede0222012-05-01 16:37:57 -050024 KEEP(*(.got))
25 PROVIDE(_GLOBAL_OFFSET_TABLE_ = . + 4);
Mingkai Hu59fd9e22009-09-22 14:53:10 +080026 _FIXUP_TABLE_ = .;
Haiying Wang9ac755b2010-11-10 14:32:36 -050027 KEEP(*(.fixup))
Mingkai Hu59fd9e22009-09-22 14:53:10 +080028 }
Scott Wood4ede0222012-05-01 16:37:57 -050029 __got2_entries = ((_GLOBAL_OFFSET_TABLE_ - _GOT2_TABLE_) >> 2) - 1;
Mingkai Hu59fd9e22009-09-22 14:53:10 +080030 __fixup_entries = (. - _FIXUP_TABLE_) >> 2;
31
32 . = ALIGN(8);
33 .data : {
34 *(.rodata*)
35 *(.data*)
36 *(.sdata*)
37 }
38 _edata = .;
39
Marek Vasut607092a2012-10-12 10:27:03 +000040 .u_boot_list : {
Albert ARIBAUDc24895e2013-02-25 00:59:00 +000041 KEEP(*(SORT(.u_boot_list*)));
Marek Vasut607092a2012-10-12 10:27:03 +000042 }
43
Mingkai Hu59fd9e22009-09-22 14:53:10 +080044 . = ALIGN(8);
45 __init_begin = .;
46 __init_end = .;
Dipen Dudhat9eae0832011-03-22 09:27:39 +053047#if defined(CONFIG_FSL_IFC) /* Restrict bootpg at 4K boundry for IFC */
48 .bootpg ADDR(.text) + 0x1000 :
49 {
50 start.o (.bootpg)
51 }
52#define RESET_VECTOR_OFFSET 0x1ffc /* IFC has 8K sram */
53#elif defined(CONFIG_FSL_ELBC)
54#define RESET_VECTOR_OFFSET 0xffc /* LBC has 4k sram */
55#else
56#error unknown NAND controller
57#endif
58 .resetvec ADDR(.text) + RESET_VECTOR_OFFSET : {
Haiying Wang9ac755b2010-11-10 14:32:36 -050059 KEEP(*(.resetvec))
Mingkai Hu59fd9e22009-09-22 14:53:10 +080060 } = 0xffff
61
62 __bss_start = .;
63 .bss : {
Haiying Wang9ac755b2010-11-10 14:32:36 -050064 *(.sbss*)
65 *(.bss*)
Mingkai Hu59fd9e22009-09-22 14:53:10 +080066 }
Simon Glassed70c8f2013-03-14 06:54:53 +000067 __bss_end = .;
Mingkai Hu59fd9e22009-09-22 14:53:10 +080068}
Dipen Dudhat9eae0832011-03-22 09:27:39 +053069ASSERT(__init_end <= (0xfff00000 + RESET_VECTOR_OFFSET), "NAND bootstrap too big");