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
|
|
|
*
|
2013-07-08 07:37:19 +00:00
|
|
|
* SPDX-License-Identifier: GPL-2.0+
|
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
|
|
|
|
|
2014-03-31 10:01:34 +00:00
|
|
|
#ifndef CONFIG_SYS_MONITOR_LEN
|
|
|
|
#define CONFIG_SYS_MONITOR_LEN 0x80000
|
|
|
|
#endif
|
|
|
|
|
2009-04-03 20:36:13 +00:00
|
|
|
OUTPUT_ARCH(powerpc)
|
2014-04-11 15:09:44 +00:00
|
|
|
ENTRY(_start_e500)
|
2010-09-29 19:05:56 +00:00
|
|
|
|
2009-04-03 20:36:13 +00:00
|
|
|
PHDRS
|
|
|
|
{
|
|
|
|
text PT_LOAD;
|
|
|
|
bss PT_LOAD;
|
|
|
|
}
|
|
|
|
|
|
|
|
SECTIONS
|
|
|
|
{
|
|
|
|
/* Read-only sections, merged into text segment: */
|
|
|
|
. = + SIZEOF_HEADERS;
|
|
|
|
.interp : { *(.interp) }
|
|
|
|
.text :
|
|
|
|
{
|
2010-09-29 19:05:56 +00:00
|
|
|
*(.text*)
|
2009-04-03 20:36:13 +00:00
|
|
|
} :text
|
|
|
|
_etext = .;
|
|
|
|
PROVIDE (etext = .);
|
|
|
|
.rodata :
|
|
|
|
{
|
|
|
|
*(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))
|
|
|
|
} :text
|
|
|
|
|
|
|
|
/* 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))
|
|
|
|
PROVIDE(_GLOBAL_OFFSET_TABLE_ = . + 4);
|
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);
|
|
|
|
.u_boot_list : {
|
2013-02-25 00:59:00 +00:00
|
|
|
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 = .;
|
|
|
|
|
|
|
|
. = ALIGN(256);
|
|
|
|
__init_begin = .;
|
|
|
|
.text.init : { *(.text.init) }
|
|
|
|
.data.init : { *(.data.init) }
|
|
|
|
. = ALIGN(256);
|
|
|
|
__init_end = .;
|
|
|
|
|
2013-05-20 06:07:23 +00:00
|
|
|
#ifdef CONFIG_SYS_MPC85XX_NO_RESETVEC
|
|
|
|
.bootpg ADDR(.text) - 0x1000 :
|
|
|
|
{
|
|
|
|
KEEP(arch/powerpc/cpu/mpc85xx/start.o (.bootpg))
|
|
|
|
} :text = 0xffff
|
2014-03-31 10:01:34 +00:00
|
|
|
. = ADDR(.text) + CONFIG_SYS_MONITOR_LEN;
|
2013-05-20 06:07:23 +00:00
|
|
|
#else
|
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)
|
2009-04-03 20:36:13 +00:00
|
|
|
} :text = 0xffff
|
|
|
|
|
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))
|
2009-04-03 20:36:13 +00:00
|
|
|
} :text = 0xffff
|
|
|
|
|
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)
|
|
|
|
} :bss
|
|
|
|
|
|
|
|
. = ALIGN(4);
|
2013-03-14 06:54:53 +00:00
|
|
|
__bss_end = . ;
|
2009-04-03 20:36:13 +00:00
|
|
|
PROVIDE (end = .);
|
|
|
|
}
|