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
|
|
|
*
|
|
|
|
* See file CREDITS for list of people who contributed to this
|
|
|
|
* project.
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU General Public License as
|
|
|
|
* published by the Free Software Foundation; either version 2 of
|
|
|
|
* the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program; if not, write to the Free Software
|
|
|
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
|
|
|
|
* MA 02111-1307 USA
|
|
|
|
*/
|
|
|
|
|
2011-01-12 08:48:53 +00:00
|
|
|
#include "config.h" /* CONFIG_BOARDDIR */
|
|
|
|
|
|
|
|
#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)
|
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 = .;
|
|
|
|
|
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;
|
|
|
|
#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 = .);
|
|
|
|
}
|