blob: a2193bf7680268b50aa748fefdc9bf25a87a0bf8 [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 = .;
Jagdish Gediya910e1ae2018-09-03 21:35:05 +053045 _end = .;
Dipen Dudhat9eae0832011-03-22 09:27:39 +053046#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 Wang9ac755b2010-11-10 14:32:36 -050058 KEEP(*(.resetvec))
Mingkai Hu59fd9e22009-09-22 14:53:10 +080059 } = 0xffff
60
61 __bss_start = .;
62 .bss : {
Haiying Wang9ac755b2010-11-10 14:32:36 -050063 *(.sbss*)
64 *(.bss*)
Mingkai Hu59fd9e22009-09-22 14:53:10 +080065 }
Simon Glassed70c8f2013-03-14 06:54:53 +000066 __bss_end = .;
Mingkai Hu59fd9e22009-09-22 14:53:10 +080067}
Dipen Dudhat9eae0832011-03-22 09:27:39 +053068ASSERT(__init_end <= (0xfff00000 + RESET_VECTOR_OFFSET), "NAND bootstrap too big");