/*
 * (C) Copyright 2000
 * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
 *
 * 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
 */

OUTPUT_FORMAT ("elf32-bigarm", "elf32-bigarm", "elf32-bigarm")
OUTPUT_ARCH (arm)
ENTRY (_start)
SECTIONS
{
	. = 0x00000000;

	. = ALIGN (4);
	.text : {
		cpu/ixp/start.o(.text)
		lib/string.o(.text)
		lib/vsprintf.o(.text)
		arch/arm/lib/board.o(.text)
		common/dlmalloc.o(.text)
		cpu/ixp/cpu.o(.text)

		. = env_offset;
		common/env_embedded.o (.ppcenv)

		* (.text)
	}

	. = ALIGN (4);
	.rodata : {
		*(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))
	}

	. = ALIGN (4);
	.data : {
		*(.data)
	}

	. = ALIGN (4);
	.got : {
		*(.got)
	}

	. =.;
	__u_boot_cmd_start =.;
	.u_boot_cmd : {
		*(.u_boot_cmd)
	}
	__u_boot_cmd_end =.;

	. = ALIGN (4);
	__bss_start =.;
	.bss (NOLOAD): {
		*(.bss)
		. = ALIGN(4);
	}
	_end =.;
}
