2018-05-06 21:58:06 +00:00
|
|
|
/* SPDX-License-Identifier: GPL-2.0+ */
|
2009-04-03 20:36:13 +00:00
|
|
|
/*
|
2011-01-12 08:48:53 +00:00
|
|
|
* Copyright 2007-2009, 2011 Freescale Semiconductor, Inc.
|
2009-04-03 20:36:13 +00:00
|
|
|
*/
|
|
|
|
|
2014-04-28 01:17:10 +00:00
|
|
|
#include "config.h"
|
2011-01-12 08:48:53 +00:00
|
|
|
|
|
|
|
#ifdef CONFIG_RESET_VECTOR_ADDRESS
|
|
|
|
#define RESET_VECTOR_ADDRESS CONFIG_RESET_VECTOR_ADDRESS
|
|
|
|
#else
|
2009-09-09 16:40:41 +00:00
|
|
|
#define RESET_VECTOR_ADDRESS 0xfffffffc
|
|
|
|
#endif
|
|
|
|
|
2009-04-03 20:36:13 +00:00
|
|
|
OUTPUT_ARCH(powerpc)
|
2022-04-02 22:05:09 +00:00
|
|
|
ENTRY(_start)
|
2010-09-29 19:05:56 +00:00
|
|
|
|
2009-04-03 20:36:13 +00:00
|
|
|
SECTIONS
|
|
|
|
{
|
2022-05-11 18:57:31 +00:00
|
|
|
/* Optional boot sector */
|
|
|
|
#if defined(CONFIG_FSL_PREPBL_ESDHC_BOOT_SECTOR) && !defined(CONFIG_SPL)
|
2022-10-21 00:22:39 +00:00
|
|
|
.bootsect CONFIG_TEXT_BASE - CONFIG_FSL_PREPBL_ESDHC_BOOT_SECTOR_DATA * 512 : {
|
2022-05-11 18:57:31 +00:00
|
|
|
KEEP(arch/powerpc/cpu/mpc85xx/start.o (.bootsect))
|
|
|
|
. = CONFIG_FSL_PREPBL_ESDHC_BOOT_SECTOR_DATA * 512;
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
2009-04-03 20:36:13 +00:00
|
|
|
/* Read-only sections, merged into text segment: */
|
2022-06-16 12:19:44 +00:00
|
|
|
.text :
|
2022-04-05 13:12:35 +00:00
|
|
|
{
|
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(arch/powerpc/cpu/mpc85xx/start.o (.bootpg))
|
|
|
|
#endif
|
2010-09-29 19:05:56 +00:00
|
|
|
*(.text*)
|
2022-06-16 12:19:44 +00:00
|
|
|
}
|
2009-04-03 20:36:13 +00:00
|
|
|
_etext = .;
|
|
|
|
PROVIDE (etext = .);
|
|
|
|
.rodata :
|
|
|
|
{
|
|
|
|
*(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))
|
2022-06-16 12:19:44 +00:00
|
|
|
}
|
2009-04-03 20:36:13 +00:00
|
|
|
|
|
|
|
/* Read-write section, merged into data segment: */
|
|
|
|
. = (. + 0x00FF) & 0xFFFFFF00;
|
|
|
|
_erotext = .;
|
|
|
|
PROVIDE (erotext = .);
|
|
|
|
.reloc :
|
|
|
|
{
|
|
|
|
_GOT2_TABLE_ = .;
|
2010-09-29 19:05:56 +00:00
|
|
|
KEEP(*(.got2))
|
2010-12-03 16:30:37 +00:00
|
|
|
KEEP(*(.got))
|
2009-04-03 20:36:13 +00:00
|
|
|
_FIXUP_TABLE_ = .;
|
2010-09-29 19:05:56 +00:00
|
|
|
KEEP(*(.fixup))
|
2009-04-03 20:36:13 +00:00
|
|
|
}
|
2010-12-03 16:30:37 +00:00
|
|
|
__got2_entries = ((_GLOBAL_OFFSET_TABLE_ - _GOT2_TABLE_) >> 2) - 1;
|
2009-04-03 20:36:13 +00:00
|
|
|
__fixup_entries = (. - _FIXUP_TABLE_) >> 2;
|
|
|
|
|
|
|
|
.data :
|
|
|
|
{
|
2010-09-29 19:05:56 +00:00
|
|
|
*(.data*)
|
|
|
|
*(.sdata*)
|
2009-04-03 20:36:13 +00:00
|
|
|
}
|
|
|
|
_edata = .;
|
|
|
|
PROVIDE (edata = .);
|
|
|
|
|
|
|
|
. = .;
|
|
|
|
|
2012-10-12 10:27:03 +00:00
|
|
|
. = ALIGN(4);
|
2022-05-30 10:00:04 +00:00
|
|
|
__u_boot_list : {
|
|
|
|
KEEP(*(SORT(__u_boot_list*)));
|
2012-10-12 10:27:03 +00:00
|
|
|
}
|
|
|
|
|
2009-04-03 20:36:13 +00:00
|
|
|
. = .;
|
|
|
|
__start___ex_table = .;
|
|
|
|
__ex_table : { *(__ex_table) }
|
|
|
|
__stop___ex_table = .;
|
|
|
|
|
2022-04-05 13:12:30 +00:00
|
|
|
. = ALIGN(4);
|
2009-04-03 20:36:13 +00:00
|
|
|
__init_begin = .;
|
|
|
|
.text.init : { *(.text.init) }
|
|
|
|
.data.init : { *(.data.init) }
|
2022-04-05 13:12:30 +00:00
|
|
|
. = ALIGN(4);
|
2009-04-03 20:36:13 +00:00
|
|
|
__init_end = .;
|
2018-09-03 16:05:05 +00:00
|
|
|
_end = .;
|
2009-04-03 20:36:13 +00:00
|
|
|
|
2022-06-11 02:59:37 +00:00
|
|
|
#if !CONFIG_IS_ENABLED(SYS_MPC85XX_NO_RESETVEC)
|
2009-09-09 16:40:41 +00:00
|
|
|
.bootpg RESET_VECTOR_ADDRESS - 0xffc :
|
2009-04-03 20:36:13 +00:00
|
|
|
{
|
2010-04-15 14:07:28 +00:00
|
|
|
arch/powerpc/cpu/mpc85xx/start.o (.bootpg)
|
2022-06-16 12:19:44 +00:00
|
|
|
} = 0xffff
|
2009-04-03 20:36:13 +00:00
|
|
|
|
2009-09-09 16:40:41 +00:00
|
|
|
.resetvec RESET_VECTOR_ADDRESS :
|
2009-04-03 20:36:13 +00:00
|
|
|
{
|
2010-09-29 19:05:56 +00:00
|
|
|
KEEP(*(.resetvec))
|
2022-06-16 12:19:44 +00:00
|
|
|
} = 0xffff
|
2009-04-03 20:36:13 +00:00
|
|
|
|
2009-09-09 16:40:41 +00:00
|
|
|
. = RESET_VECTOR_ADDRESS + 0x4;
|
2009-04-03 20:36:13 +00:00
|
|
|
|
2009-10-07 16:45:00 +00:00
|
|
|
/*
|
|
|
|
* Make sure that the bss segment isn't linked at 0x0, otherwise its
|
|
|
|
* address won't be updated during relocation fixups. Note that
|
|
|
|
* this is a temporary fix. Code to dynamically the fixup the bss
|
|
|
|
* location will be added in the future. When the bss relocation
|
|
|
|
* fixup code is present this workaround should be removed.
|
|
|
|
*/
|
|
|
|
#if (RESET_VECTOR_ADDRESS == 0xfffffffc)
|
|
|
|
. |= 0x10;
|
2013-05-20 06:07:23 +00:00
|
|
|
#endif
|
2009-10-07 16:45:00 +00:00
|
|
|
#endif
|
|
|
|
|
2009-04-03 20:36:13 +00:00
|
|
|
__bss_start = .;
|
|
|
|
.bss (NOLOAD) :
|
|
|
|
{
|
2010-09-29 19:05:56 +00:00
|
|
|
*(.sbss*)
|
|
|
|
*(.bss*)
|
2009-04-03 20:36:13 +00:00
|
|
|
*(COMMON)
|
2022-06-16 12:19:44 +00:00
|
|
|
}
|
2009-04-03 20:36:13 +00:00
|
|
|
|
|
|
|
. = ALIGN(4);
|
2013-03-14 06:54:53 +00:00
|
|
|
__bss_end = . ;
|
2009-04-03 20:36:13 +00:00
|
|
|
PROVIDE (end = .);
|
|
|
|
}
|