2018-05-06 21:58:06 +00:00
|
|
|
/* SPDX-License-Identifier: GPL-2.0+ */
|
2012-09-21 00:02:18 +00:00
|
|
|
/*
|
|
|
|
* (C) Copyright 2006
|
|
|
|
* Wolfgang Denk, DENX Software Engineering, wd@denx.de
|
|
|
|
*
|
|
|
|
* Copyright 2009 Freescale Semiconductor, Inc.
|
|
|
|
*/
|
|
|
|
|
2014-04-28 01:17:10 +00:00
|
|
|
#include "config.h"
|
2012-09-21 00:02:18 +00:00
|
|
|
|
|
|
|
OUTPUT_ARCH(powerpc)
|
2022-06-16 12:19:44 +00:00
|
|
|
|
2012-09-21 00:02:18 +00:00
|
|
|
SECTIONS
|
|
|
|
{
|
2022-05-11 18:57:31 +00:00
|
|
|
/* Optional boot sector */
|
|
|
|
#if defined(CONFIG_FSL_PREPBL_ESDHC_BOOT_SECTOR)
|
|
|
|
.bootsect IMAGE_TEXT_BASE - CONFIG_FSL_PREPBL_ESDHC_BOOT_SECTOR_DATA * 512 : {
|
|
|
|
KEEP(*(.bootsect))
|
|
|
|
. = CONFIG_FSL_PREPBL_ESDHC_BOOT_SECTOR_DATA * 512;
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
2022-06-16 12:19:44 +00:00
|
|
|
. = IMAGE_TEXT_BASE;
|
|
|
|
.text : {
|
2022-04-05 13:12:35 +00:00
|
|
|
/* For ifc, elbc, esdhc, espi, all need the SPL without section .resetvec */
|
2022-06-11 02:59:37 +00:00
|
|
|
#if CONFIG_IS_ENABLED(SYS_MPC85XX_NO_RESETVEC)
|
2022-04-05 13:12:35 +00:00
|
|
|
KEEP(*(.bootpg))
|
|
|
|
#endif
|
2012-09-21 00:02:18 +00:00
|
|
|
*(.text*)
|
|
|
|
}
|
|
|
|
_etext = .;
|
|
|
|
|
|
|
|
.reloc : {
|
|
|
|
_GOT2_TABLE_ = .;
|
|
|
|
KEEP(*(.got2))
|
|
|
|
KEEP(*(.got))
|
|
|
|
_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);
|
2022-05-30 10:00:04 +00:00
|
|
|
__u_boot_list : {
|
|
|
|
KEEP(*(SORT(__u_boot_list*)));
|
2013-09-04 09:03:45 +00:00
|
|
|
}
|
|
|
|
|
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 = .;
|
2018-09-03 16:05:05 +00:00
|
|
|
_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
|
|
|
|
2022-04-05 13:12:35 +00:00
|
|
|
/* For nor and nand is needed the SPL with section .resetvec */
|
2022-06-11 02:59:37 +00:00
|
|
|
#if !CONFIG_IS_ENABLED(SYS_MPC85XX_NO_RESETVEC)
|
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
|
2022-04-05 13:12:35 +00:00
|
|
|
.bootpg IMAGE_TEXT_BASE + 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
|
2022-04-05 13:12:35 +00:00
|
|
|
.resetvec IMAGE_TEXT_BASE + RESET_VECTOR_OFFSET : {
|
2012-09-21 00:02:18 +00:00
|
|
|
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
|
|
|
}
|