2009-10-27 15:11:26 +00:00
|
|
|
/*
|
|
|
|
* Copyright 2007-2009 Freescale Semiconductor, Inc.
|
|
|
|
*
|
2013-07-08 07:37:19 +00:00
|
|
|
* SPDX-License-Identifier: GPL-2.0+
|
2009-10-27 15:11:26 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
#include "config.h" /* CONFIG_BOARDDIR */
|
|
|
|
|
|
|
|
#ifndef RESET_VECTOR_ADDRESS
|
2010-12-07 13:27:56 +00:00
|
|
|
#ifdef CONFIG_RESET_VECTOR_ADDRESS
|
|
|
|
#define RESET_VECTOR_ADDRESS CONFIG_RESET_VECTOR_ADDRESS
|
|
|
|
#else
|
2009-10-27 15:11:26 +00:00
|
|
|
#define RESET_VECTOR_ADDRESS 0xfffffffc
|
|
|
|
#endif
|
2010-12-07 13:27:56 +00:00
|
|
|
#endif
|
2009-10-27 15:11:26 +00:00
|
|
|
|
|
|
|
OUTPUT_ARCH(powerpc)
|
2010-11-21 19:55:42 +00:00
|
|
|
|
2009-10-27 15:11:26 +00:00
|
|
|
PHDRS
|
|
|
|
{
|
|
|
|
text PT_LOAD;
|
|
|
|
bss PT_LOAD;
|
|
|
|
}
|
|
|
|
|
|
|
|
SECTIONS
|
|
|
|
{
|
|
|
|
/* Read-only sections, merged into text segment: */
|
|
|
|
. = + SIZEOF_HEADERS;
|
|
|
|
.text :
|
|
|
|
{
|
2010-11-21 19:55:42 +00:00
|
|
|
*(.text*)
|
2009-10-27 15:11:26 +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-11-21 19:55:42 +00:00
|
|
|
KEEP(*(.got2))
|
2010-12-03 16:30:37 +00:00
|
|
|
KEEP(*(.got))
|
|
|
|
PROVIDE(_GLOBAL_OFFSET_TABLE_ = . + 4);
|
2009-10-27 15:11:26 +00:00
|
|
|
_FIXUP_TABLE_ = .;
|
2010-11-21 19:55:42 +00:00
|
|
|
KEEP(*(.fixup))
|
2009-10-27 15:11:26 +00:00
|
|
|
}
|
2010-12-03 16:30:37 +00:00
|
|
|
__got2_entries = ((_GLOBAL_OFFSET_TABLE_ - _GOT2_TABLE_) >> 2) - 1;
|
2009-10-27 15:11:26 +00:00
|
|
|
__fixup_entries = (. - _FIXUP_TABLE_) >> 2;
|
|
|
|
|
|
|
|
.data :
|
|
|
|
{
|
2010-11-21 19:55:42 +00:00
|
|
|
*(.data*)
|
|
|
|
*(.sdata*)
|
2009-10-27 15:11:26 +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-10-27 15:11:26 +00:00
|
|
|
. = .;
|
|
|
|
__start___ex_table = .;
|
|
|
|
__ex_table : { *(__ex_table) }
|
|
|
|
__stop___ex_table = .;
|
|
|
|
|
|
|
|
. = ALIGN(256);
|
|
|
|
__init_begin = .;
|
|
|
|
.text.init : { *(.text.init) }
|
2015-02-07 18:51:44 +00:00
|
|
|
.data.init : {
|
|
|
|
*(.data.init)
|
|
|
|
. = ALIGN(256);
|
|
|
|
LONG(0) LONG(0) /* Extend u-boot.bin to here */
|
|
|
|
}
|
2009-10-27 15:11:26 +00:00
|
|
|
__init_end = .;
|
2015-02-07 18:51:44 +00:00
|
|
|
_end = .;
|
2009-10-27 15:11:26 +00:00
|
|
|
|
2013-04-02 08:37:04 +00:00
|
|
|
#ifndef CONFIG_SPL
|
2009-10-27 15:11:26 +00:00
|
|
|
#ifdef CONFIG_440
|
|
|
|
.bootpg RESET_VECTOR_ADDRESS - 0xffc :
|
|
|
|
{
|
2010-04-15 14:07:28 +00:00
|
|
|
arch/powerpc/cpu/ppc4xx/start.o (.bootpg)
|
2009-10-27 15:11:26 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* PPC440 board need a board specific object with the
|
|
|
|
* TLB definitions. This needs to get included right after
|
|
|
|
* start.o, since the first shadow TLB only covers 4k
|
|
|
|
* of address space.
|
|
|
|
*/
|
2010-12-07 13:27:56 +00:00
|
|
|
#ifdef CONFIG_INIT_TLB
|
|
|
|
CONFIG_INIT_TLB (.bootpg)
|
|
|
|
#else
|
2009-10-27 15:11:26 +00:00
|
|
|
CONFIG_BOARDDIR/init.o (.bootpg)
|
2010-12-07 13:27:56 +00:00
|
|
|
#endif
|
2009-10-27 15:11:26 +00:00
|
|
|
} :text = 0xffff
|
|
|
|
#endif
|
|
|
|
|
|
|
|
.resetvec RESET_VECTOR_ADDRESS :
|
|
|
|
{
|
2010-11-21 19:55:42 +00:00
|
|
|
KEEP(*(.resetvec))
|
2009-10-27 15:11:26 +00:00
|
|
|
} :text = 0xffff
|
|
|
|
|
|
|
|
. = RESET_VECTOR_ADDRESS + 0x4;
|
|
|
|
|
|
|
|
/*
|
|
|
|
* 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;
|
|
|
|
#endif
|
2013-04-02 08:37:04 +00:00
|
|
|
#endif /* CONFIG_SPL */
|
2009-10-27 15:11:26 +00:00
|
|
|
|
|
|
|
__bss_start = .;
|
|
|
|
.bss (NOLOAD) :
|
|
|
|
{
|
2010-11-21 19:55:42 +00:00
|
|
|
*(.bss*)
|
|
|
|
*(.sbss*)
|
2009-10-27 15:11:26 +00:00
|
|
|
*(COMMON)
|
|
|
|
} :bss
|
|
|
|
|
|
|
|
. = ALIGN(4);
|
2013-03-14 06:54:53 +00:00
|
|
|
__bss_end = . ;
|
2009-10-27 15:11:26 +00:00
|
|
|
PROVIDE (end = .);
|
|
|
|
}
|