/*
 * (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_generic/string.o (.text)
		lib_generic/vsprintf.o (.text)
		lib_arm/board.o (.text)
		common/dlmalloc.o (.text)
		cpu/ixp/cpu.o (.text)

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

		* (.text)
	}

	. = ALIGN (4);
	.rodata : {
		*(.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)
	}
	_end =.;
}
