-
Notifications
You must be signed in to change notification settings - Fork 0
/
ld.scr
56 lines (46 loc) · 826 Bytes
/
ld.scr
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
/* H8/3048F */
OUTPUT_ARCH(h8300h)
ENTRY("_start")
MEMORY
{
romall(rx) : o = 0x000000, l = 0x020000 /* 128KB */
vectors(r) : o = 0x000000, l = 0x000100 /* top of ROM */
rom(rx) : o = 0x000100, l = 0x01ff00
ramall(rwx) : o = 0xffef10, l = 0x001000 /* 4KB */
data(rwx) : o = 0xffef10, l = 0x000c00
stack(rw) : o = 0xffff10, l = 0x000000 /* end of RAM */
}
SECTIONS
{
.vectors : {
vector.o(.data)
} > vectors
.text : {
_text_start = . ;
*(.text)
_etext = . ;
} > rom
.rodata : {
_rodata_start = . ;
*(.strings)
*(.rodata)
*(.rodata.*)
_erodata = . ;
} > rom
.data : {
_data_start = . ;
*(.data)
_edata = . ;
} > data AT> rom
.bss : {
_bss_start = . ;
*(.bss)
*(COMMON)
_ebss = . ;
} > data AT> rom
. = ALIGN(4);
_end = . ;
.stack : {
_stack = .;
} > stack
}