summaryrefslogtreecommitdiff
path: root/model.lds.S
blob: 10cd4b3183842d78e06be7461b811cf5526271f5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
/*
 * model.lds.S - simple linker script for stand-alone Linux booting
 *
 * Copyright (C) 2009 ARM Limited
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 as
 * published by the Free Software Foundation.
 *
 * 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-littlearm")
OUTPUT_ARCH(arm)
TARGET(binary)

INPUT(./boot.o)
INPUT(./uImage)
#ifdef USE_INITRD
INPUT(./filesystem.cpio.gz)
#endif

#ifdef MACH_MPS
PHYS_OFFSET = 0x10000000;
#elif defined (VEXPRESS)
PHYS_OFFSET = 0x80000000;
#else
PHYS_OFFSET = 0x70000000;
#endif

SECTIONS
{
	. = PHYS_OFFSET;
	.text : { boot.o }

	. = PHYS_OFFSET + 0x8000 - 0x40;
	kernel = . + 0x40;
	.kernel : { ./uImage }

	. = PHYS_OFFSET + 0x00800000;
	filesystem = .;
#ifdef USE_INITRD
	.filesystem : { ./filesystem.cpio.gz }
	fs_size = . - filesystem;
#endif

	.data : { *(.data) }
	.bss : { *(.bss) }
}