1c97cd1baSScott Wood/* 2c97cd1baSScott Wood * (C) Copyright 2006 3c97cd1baSScott Wood * Wolfgang Denk, DENX Software Engineering, wd@denx.de 4c97cd1baSScott Wood * 5c97cd1baSScott Wood * Copyright 2009 Freescale Semiconductor, Inc. 6c97cd1baSScott Wood * 7c97cd1baSScott Wood * See file CREDITS for list of people who contributed to this 8c97cd1baSScott Wood * project. 9c97cd1baSScott Wood * 10c97cd1baSScott Wood * This program is free software; you can redistribute it and/or 11c97cd1baSScott Wood * modify it under the terms of the GNU General Public License as 12c97cd1baSScott Wood * published by the Free Software Foundation; either version 2 of 13c97cd1baSScott Wood * the License, or (at your option) any later version. 14c97cd1baSScott Wood * 15c97cd1baSScott Wood * This program is distributed in the hope that it will be useful, 16c97cd1baSScott Wood * but WITHOUT ANY WARRANTY; without even the implied warranty of 17c97cd1baSScott Wood * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18c97cd1baSScott Wood * GNU General Public License for more details. 19c97cd1baSScott Wood * 20c97cd1baSScott Wood * You should have received a copy of the GNU General Public License 21c97cd1baSScott Wood * along with this program; if not, write to the Free Software 22c97cd1baSScott Wood * Foundation, Inc., 59 Temple Place, Suite 330, Boston, 23c97cd1baSScott Wood * MA 02111-1307 USA 24c97cd1baSScott Wood */ 25c97cd1baSScott Wood 26c97cd1baSScott Wood#include "config.h" /* CONFIG_BOARDDIR */ 27c97cd1baSScott Wood 28c97cd1baSScott WoodOUTPUT_ARCH(powerpc) 29*5df572f0SYing Zhang#ifdef CONFIG_SYS_MPC85XX_NO_RESETVEC 30*5df572f0SYing ZhangPHDRS 31*5df572f0SYing Zhang{ 32*5df572f0SYing Zhang text PT_LOAD; 33*5df572f0SYing Zhang bss PT_LOAD; 34*5df572f0SYing Zhang} 35*5df572f0SYing Zhang#endif 36c97cd1baSScott WoodSECTIONS 37c97cd1baSScott Wood{ 38c97cd1baSScott Wood . = CONFIG_SPL_TEXT_BASE; 39c97cd1baSScott Wood .text : { 40c97cd1baSScott Wood *(.text*) 41c97cd1baSScott Wood } 42c97cd1baSScott Wood _etext = .; 43c97cd1baSScott Wood 44c97cd1baSScott Wood .reloc : { 45c97cd1baSScott Wood _GOT2_TABLE_ = .; 46c97cd1baSScott Wood KEEP(*(.got2)) 47c97cd1baSScott Wood KEEP(*(.got)) 48c97cd1baSScott Wood PROVIDE(_GLOBAL_OFFSET_TABLE_ = . + 4); 49c97cd1baSScott Wood _FIXUP_TABLE_ = .; 50c97cd1baSScott Wood KEEP(*(.fixup)) 51c97cd1baSScott Wood } 52c97cd1baSScott Wood __got2_entries = ((_GLOBAL_OFFSET_TABLE_ - _GOT2_TABLE_) >> 2) - 1; 53c97cd1baSScott Wood __fixup_entries = (. - _FIXUP_TABLE_) >> 2; 54c97cd1baSScott Wood 55c97cd1baSScott Wood . = ALIGN(8); 56c97cd1baSScott Wood .data : { 57c97cd1baSScott Wood *(.rodata*) 58c97cd1baSScott Wood *(.data*) 59c97cd1baSScott Wood *(.sdata*) 60c97cd1baSScott Wood } 61c97cd1baSScott Wood _edata = .; 62c97cd1baSScott Wood 63c97cd1baSScott Wood . = ALIGN(8); 64c97cd1baSScott Wood __init_begin = .; 65c97cd1baSScott Wood __init_end = .; 66c97cd1baSScott Wood/* FIXME for non-NAND SPL */ 67c97cd1baSScott Wood#if defined(CONFIG_FSL_IFC) /* Restrict bootpg at 4K boundry for IFC */ 68c97cd1baSScott Wood .bootpg ADDR(.text) + 0x1000 : 69c97cd1baSScott Wood { 703a88179dSPrabhakar Kushwaha arch/powerpc/cpu/mpc85xx/start.o (.bootpg) 71c97cd1baSScott Wood } 72c97cd1baSScott Wood#define RESET_VECTOR_OFFSET 0x1ffc /* IFC has 8K sram */ 73c97cd1baSScott Wood#elif defined(CONFIG_FSL_ELBC) 74c97cd1baSScott Wood#define RESET_VECTOR_OFFSET 0xffc /* LBC has 4k sram */ 75c97cd1baSScott Wood#else 76c97cd1baSScott Wood#error unknown NAND controller 77c97cd1baSScott Wood#endif 78*5df572f0SYing Zhang#ifdef CONFIG_SYS_MPC85XX_NO_RESETVEC 79*5df572f0SYing Zhang .bootpg ADDR(.text) - 0x1000 : 80*5df572f0SYing Zhang { 81*5df572f0SYing Zhang KEEP(*(.bootpg)) 82*5df572f0SYing Zhang } :text = 0xffff 83*5df572f0SYing Zhang#else 84c97cd1baSScott Wood .resetvec ADDR(.text) + RESET_VECTOR_OFFSET : { 85c97cd1baSScott Wood KEEP(*(.resetvec)) 86c97cd1baSScott Wood } = 0xffff 87*5df572f0SYing Zhang#endif 88c97cd1baSScott Wood 89c97cd1baSScott Wood /* 90c97cd1baSScott Wood * Make sure that the bss segment isn't linked at 0x0, otherwise its 91c97cd1baSScott Wood * address won't be updated during relocation fixups. 92c97cd1baSScott Wood */ 93c97cd1baSScott Wood . |= 0x10; 94c97cd1baSScott Wood 95c97cd1baSScott Wood __bss_start = .; 96c97cd1baSScott Wood .bss : { 97c97cd1baSScott Wood *(.sbss*) 98c97cd1baSScott Wood *(.bss*) 99c97cd1baSScott Wood } 1003929fb0aSSimon Glass __bss_end = .; 101c97cd1baSScott Wood} 102