summaryrefslogtreecommitdiff
path: root/openpicc/config/atmel-rom.ld
blob: 447bd07c871415eb95f5f75b29027b4028b868bb (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
MEMORY 
{
	boot    : ORIGIN = 0x00100000, LENGTH = 0x200
	flash   : ORIGIN = 0x00100200, LENGTH = 256K - 0x200
	vectors	: ORIGIN = 0x00200000, LENGTH = 0x200
	ram	: ORIGIN = 0x00200200, LENGTH = 64K - 0x200
}

__stack_end__ = 0x00200000 + 64K - 4;

SECTIONS 
{
	. = 0;
	startup : {
	    *(.startup)
	    _startup_end = .;
	} >boot

	prog : 
	{
		*(.text)
		*(.text.*)
		*(.rodata)
		*(.rodata*)
		*(.glue_7)
		*(.glue_7t)
	} >flash

	__end_of_text__ = .;

	.data : 
	{
		__data_beg__ = .;
		__data_beg_src__ = __end_of_text__;
		*(.data)
		*(.data.*)
		*(.fastrun)
		*(.ramfunc)
		__data_end__ = .;
	} >ram AT>flash

	.bss : 
	{
		__bss_beg__ = .;
		*(.bss)
		*(.bss.*)
	} >ram

	/* Align here to ensure that the .bss section occupies space up to
	_end.  Align after .bss to ensure correct alignment even if the
	.bss section disappears because there are no input sections.  */
	. = ALIGN(32 / 8);
}
	. = ALIGN(32 / 8);
	_end = .;
	_bss_end__ = . ; __bss_end__ = . ; __end__ = . ;
	PROVIDE (end = .);


personal git repositories of Harald Welte. Your mileage may vary