2012-09-21 00:02:18 +00:00
|
|
|
/*
|
|
|
|
* (C) Copyright 2006
|
|
|
|
* Wolfgang Denk, DENX Software Engineering, wd@denx.de
|
|
|
|
*
|
|
|
|
* Copyright 2009 Freescale Semiconductor, Inc.
|
|
|
|
*
|
2013-07-08 07:37:19 +00:00
|
|
|
* SPDX-License-Identifier: GPL-2.0+
|
2012-09-21 00:02:18 +00:00
|
|
|
*/
|
|
|
|
|
2014-04-28 01:17:10 +00:00
|
|
|
#include "config.h"
|
2012-09-21 00:02:18 +00:00
|
|
|
|
|
|
|
OUTPUT_ARCH(powerpc)
|
2013-05-20 06:07:23 +00:00
|
|
|
#ifdef CONFIG_SYS_MPC85XX_NO_RESETVEC
|
|
|
|
PHDRS
|
|
|
|
{
|
|
|
|
text PT_LOAD;
|
|
|
|
bss PT_LOAD;
|
|
|
|
}
|
|
|
|
#endif
|
2012-09-21 00:02:18 +00:00
|
|
|
SECTIONS
|
|
|
|
{
|
|
|
|
. = CONFIG_SPL_TEXT_BASE;
|
|
|
|
.text : {
|
|
|
|
*(.text*)
|
|
|
|
}
|
|
|
|
_etext = .;
|
|
|
|
|
|
|
|
.reloc : {
|
|
|
|
_GOT2_TABLE_ = .;
|
|
|
|
KEEP(*(.got2))
|
|
|
|
KEEP(*(.got))
|
|
|
|
PROVIDE(_GLOBAL_OFFSET_TABLE_ = . + 4);
|
|
|
|
_FIXUP_TABLE_ = .;
|
|
|
|
KEEP(*(.fixup))
|
|
|
|
}
|
|
|
|
__got2_entries = ((_GLOBAL_OFFSET_TABLE_ - _GOT2_TABLE_) >> 2) - 1;
|
|
|
|
__fixup_entries = (. - _FIXUP_TABLE_) >> 2;
|
|
|
|
|
|
|
|
. = ALIGN(8);
|
|
|
|
.data : {
|
|
|
|
*(.rodata*)
|
|
|
|
*(.data*)
|
|
|
|
*(.sdata*)
|
|
|
|
}
|
|
|
|
_edata = .;
|
|
|
|
|
2013-09-04 09:03:45 +00:00
|
|
|
. = ALIGN(4);
|
|
|
|
.u_boot_list : {
|
|
|
|
KEEP(*(SORT(.u_boot_list*)));
|
|
|
|
}
|
|
|
|
|
2013-08-16 07:16:11 +00:00
|
|
|
. = .;
|
|
|
|
__start___ex_table = .;
|
|
|
|
__ex_table : { *(__ex_table) }
|
|
|
|
__stop___ex_table = .;
|
|
|
|
|
2012-09-21 00:02:18 +00:00
|
|
|
. = ALIGN(8);
|
|
|
|
__init_begin = .;
|
|
|
|
__init_end = .;
|
2014-04-08 13:42:31 +00:00
|
|
|
#ifdef CONFIG_SPL_SKIP_RELOCATE
|
|
|
|
. = ALIGN(4);
|
|
|
|
__bss_start = .;
|
|
|
|
.bss : {
|
|
|
|
*(.sbss*)
|
|
|
|
*(.bss*)
|
|
|
|
}
|
|
|
|
. = ALIGN(4);
|
|
|
|
__bss_end = .;
|
|
|
|
#endif
|
2014-01-10 02:10:58 +00:00
|
|
|
|
|
|
|
/* For ifc, elbc, esdhc, espi, all need the SPL without section .resetvec */
|
|
|
|
#ifdef CONFIG_SYS_MPC85XX_NO_RESETVEC
|
|
|
|
.bootpg ADDR(.text) - 0x1000 :
|
|
|
|
{
|
|
|
|
KEEP(*(.bootpg))
|
|
|
|
} :text = 0xffff
|
|
|
|
#else
|
2012-09-21 00:02:18 +00:00
|
|
|
#if defined(CONFIG_FSL_IFC) /* Restrict bootpg at 4K boundry for IFC */
|
2014-04-08 13:42:19 +00:00
|
|
|
#ifndef BOOT_PAGE_OFFSET
|
|
|
|
#define BOOT_PAGE_OFFSET 0x1000
|
|
|
|
#endif
|
|
|
|
.bootpg ADDR(.text) + BOOT_PAGE_OFFSET :
|
2012-09-21 00:02:18 +00:00
|
|
|
{
|
2013-04-16 07:57:59 +00:00
|
|
|
arch/powerpc/cpu/mpc85xx/start.o (.bootpg)
|
2012-09-21 00:02:18 +00:00
|
|
|
}
|
2014-04-08 13:42:19 +00:00
|
|
|
#ifndef RESET_VECTOR_OFFSET
|
2012-09-21 00:02:18 +00:00
|
|
|
#define RESET_VECTOR_OFFSET 0x1ffc /* IFC has 8K sram */
|
2014-04-08 13:42:19 +00:00
|
|
|
#endif
|
2012-09-21 00:02:18 +00:00
|
|
|
#elif defined(CONFIG_FSL_ELBC)
|
|
|
|
#define RESET_VECTOR_OFFSET 0xffc /* LBC has 4k sram */
|
|
|
|
#else
|
|
|
|
#error unknown NAND controller
|
|
|
|
#endif
|
|
|
|
.resetvec ADDR(.text) + RESET_VECTOR_OFFSET : {
|
|
|
|
KEEP(*(.resetvec))
|
|
|
|
} = 0xffff
|
2013-05-20 06:07:23 +00:00
|
|
|
#endif
|
2012-09-21 00:02:18 +00:00
|
|
|
|
2014-04-08 13:42:31 +00:00
|
|
|
#ifndef CONFIG_SPL_SKIP_RELOCATE
|
2012-09-21 00:02:18 +00:00
|
|
|
/*
|
|
|
|
* Make sure that the bss segment isn't linked at 0x0, otherwise its
|
|
|
|
* address won't be updated during relocation fixups.
|
|
|
|
*/
|
|
|
|
. |= 0x10;
|
|
|
|
|
2013-06-07 09:25:16 +00:00
|
|
|
. = ALIGN(4);
|
2012-09-21 00:02:18 +00:00
|
|
|
__bss_start = .;
|
|
|
|
.bss : {
|
|
|
|
*(.sbss*)
|
|
|
|
*(.bss*)
|
|
|
|
}
|
2013-06-07 09:25:16 +00:00
|
|
|
. = ALIGN(4);
|
2013-03-14 06:54:53 +00:00
|
|
|
__bss_end = .;
|
2014-04-08 13:42:31 +00:00
|
|
|
#endif
|
2012-09-21 00:02:18 +00:00
|
|
|
}
|