Commit | Line | Data |
---|---|---|
7499d566 NC |
1 | test -z "$ENTRY" && ENTRY=_main |
2 | cat <<EOF | |
3 | OUTPUT_FORMAT("${OUTPUT_FORMAT}") | |
4 | ${LIB_SEARCH_DIRS} | |
5 | ENTRY(${ENTRY}) | |
6 | MEMORY | |
7 | { | |
8 | rom (rx) : ORIGIN = 0, LENGTH = 0x7FFE | |
9 | ram (!rx) : org = 0x0A000, l = 0x5FFF | |
10 | } | |
11 | ||
12 | SECTIONS | |
13 | { | |
14 | .text ${RELOCATING+ 0x0000}: | |
15 | { | |
16 | *(.text) | |
17 | } >rom | |
18 | ||
19 | .data ${RELOCATING}: | |
20 | { | |
21 | *(.data) | |
22 | *(.rodata) | |
23 | *(.bss) | |
24 | *(COMMON) | |
25 | ${RELOCATING+ edata = .}; | |
26 | }>ram | |
27 | ||
28 | /* .bss ${RELOCATING+ SIZEOF(.data) + 0x0000} : | |
29 | { | |
30 | *(.bss) | |
31 | *(COMMON) | |
32 | } | |
33 | */ | |
34 | .stab 0 ${RELOCATING+(NOLOAD)} : | |
35 | { | |
36 | [ .stab ] | |
37 | } | |
38 | .stabstr 0 ${RELOCATING+(NOLOAD)} : | |
39 | { | |
40 | [ .stabstr ] | |
41 | } | |
42 | } | |
43 | EOF |