blob: f04456442cb7c7cb105455460e882e160cf3e414 [file] [log] [blame]
Mingkai Hu098bcba2009-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 Denk1a459662013-07-08 09:37:19 +02007 * SPDX-License-Identifier: GPL-2.0+
Mingkai Hu098bcba2009-09-22 14:53:10 +08008 */
9
Masahiro Yamada6f2ed0e2014-04-28 10:17:10 +090010#include "config.h"
Dipen Dudhat52f90da2011-03-22 09:27:39 +053011
Mingkai Hu098bcba2009-09-22 14:53:10 +080012OUTPUT_ARCH(powerpc)
13SECTIONS
14{
15 . = 0xfff00000;
16 .text : {
Haiying Wang36ae6a82010-11-10 14:32:36 -050017 *(.text*)
Stefan Roesea47a12b2010-04-15 16:07:28 +020018 }
Mingkai Hu098bcba2009-09-22 14:53:10 +080019 _etext = .;
20
21 .reloc : {
22 _GOT2_TABLE_ = .;
Haiying Wang36ae6a82010-11-10 14:32:36 -050023 KEEP(*(.got2))
Scott Woodd2a97da2012-05-01 16:37:57 -050024 KEEP(*(.got))
Mingkai Hu098bcba2009-09-22 14:53:10 +080025 _FIXUP_TABLE_ = .;
Haiying Wang36ae6a82010-11-10 14:32:36 -050026 KEEP(*(.fixup))
Mingkai Hu098bcba2009-09-22 14:53:10 +080027 }
Scott Woodd2a97da2012-05-01 16:37:57 -050028 __got2_entries = ((_GLOBAL_OFFSET_TABLE_ - _GOT2_TABLE_) >> 2) - 1;
Mingkai Hu098bcba2009-09-22 14:53:10 +080029 __fixup_entries = (. - _FIXUP_TABLE_) >> 2;
30
31 . = ALIGN(8);
32 .data : {
33 *(.rodata*)
34 *(.data*)
35 *(.sdata*)
36 }
37 _edata = .;
38
Marek Vasut55675142012-10-12 10:27:03 +000039 .u_boot_list : {
Albert ARIBAUDef123c52013-02-25 00:59:00 +000040 KEEP(*(SORT(.u_boot_list*)));
Marek Vasut55675142012-10-12 10:27:03 +000041 }
42
Mingkai Hu098bcba2009-09-22 14:53:10 +080043 . = ALIGN(8);
44 __init_begin = .;
45 __init_end = .;
Dipen Dudhat52f90da2011-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 Wang36ae6a82010-11-10 14:32:36 -050058 KEEP(*(.resetvec))
Mingkai Hu098bcba2009-09-22 14:53:10 +080059 } = 0xffff
60
61 __bss_start = .;
62 .bss : {
Haiying Wang36ae6a82010-11-10 14:32:36 -050063 *(.sbss*)
64 *(.bss*)
Mingkai Hu098bcba2009-09-22 14:53:10 +080065 }
Simon Glass3929fb02013-03-14 06:54:53 +000066 __bss_end = .;
Mingkai Hu098bcba2009-09-22 14:53:10 +080067}
Dipen Dudhat52f90da2011-03-22 09:27:39 +053068ASSERT(__init_end <= (0xfff00000 + RESET_VECTOR_OFFSET), "NAND bootstrap too big");