summaryrefslogtreecommitdiffstats
path: root/arch/openrisc/cpu/barebox.lds.S
blob: adb0c22f853196d42859f8f1f84d6c0efd33882a (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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
/*
 * barebox - barebox.lds.S
 *
 * 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.
 *
 */

#include <config.h>
#include <asm-generic/barebox.lds.h>

OUTPUT_FORMAT("elf32-or1k", "elf32-or1k", "elf32-or1k")
__DYNAMIC  =  0;

MEMORY
{
	vectors	: ORIGIN = 0, LENGTH = 0x2000
	ram	: ORIGIN = TEXT_BASE,
		  LENGTH = BAREBOX_RESERVED_SIZE
}

SECTIONS
{
	.vectors :
	{
		*(.vectors)
	} > vectors

	. = ALIGN(4);
	__start = .;
	.text : AT (__start) {
		_stext = .;
		*(.text)
		_etext = .;
		*(.lit)
		*(.shdata)
		_endtext = .;
	}  > ram

	. = ALIGN(4);
	.rodata : {
		*(.rodata);
		*(.rodata.*)
		*(.bbenv.rodata.*)
		RO_DATA_SECTION
	} > ram

	__etext = .; /* End of text and rodata section */

	. = ALIGN(4);
	.data : {
		sdata = .;
		_sdata = .;
		*(.data)
		edata = .;
		_edata = .;
	} > ram

	. = ALIGN(4);
	.bss :
	{
		__bss_start = .;
		_bss_start = .;
		*(.shbss)
		*(.bss)
		*(COMMON)
		_bss_end = .;
		__bss_stop = .;
	} > ram
	__end = .;
}