Commit | Line | Data |
---|---|---|
b3adc24a | 1 | # Copyright (C) 2014-2020 Free Software Foundation, Inc. |
6c19b93b | 2 | # |
985743c7 NC |
3 | # Copying and distribution of this file, with or without modification, |
4 | # are permitted in any medium without royalty provided the copyright | |
5 | # notice and this notice are preserved. | |
6 | ||
d70c5fc7 | 7 | cat <<EOF |
b3adc24a | 8 | /* Copyright (C) 2014-2020 Free Software Foundation, Inc. |
985743c7 NC |
9 | |
10 | Copying and distribution of this script, with or without modification, | |
11 | are permitted in any medium without royalty provided the copyright | |
12 | notice and this notice are preserved. */ | |
13 | ||
d70c5fc7 NC |
14 | OUTPUT_FORMAT("${OUTPUT_FORMAT}") |
15 | OUTPUT_ARCH(${ARCH}) | |
2bf2bf23 AM |
16 | EOF |
17 | ||
18 | test -n "${RELOCATING}" && cat <<EOF | |
19 | ENTRY ("_start") | |
d70c5fc7 NC |
20 | MEMORY |
21 | { | |
6c19b93b AM |
22 | vectarea : o =0xc00000, l = 0x0300 |
23 | ||
d70c5fc7 NC |
24 | introm : o = 0xc00300, l = 0x16000 |
25 | /* The stack starts at the top of main ram. */ | |
6c19b93b | 26 | |
d70c5fc7 NC |
27 | dram : o = 0x8000 , l = 0xffff |
28 | /* At the very top of the address space is the 8-bit area. */ | |
6c19b93b AM |
29 | |
30 | ldata : o =0x4000 ,l = 0x0200 | |
d70c5fc7 | 31 | } |
2bf2bf23 AM |
32 | EOF |
33 | ||
34 | cat <<EOF | |
d70c5fc7 NC |
35 | SECTIONS |
36 | { | |
37 | /*.vects : | |
6c19b93b AM |
38 | { |
39 | *(.vects) | |
40 | } ${RELOCATING+ > vectarea} */ | |
d70c5fc7 | 41 | .init : |
6c19b93b | 42 | { |
2d3181c7 AM |
43 | KEEP (*(SORT_NONE(.init))) |
44 | ${RELOCATING+KEEP (*(SORT_NONE(.fini)))} | |
6c19b93b AM |
45 | } ${RELOCATING+ >introm} |
46 | ||
d70c5fc7 NC |
47 | .text : |
48 | { | |
2bf2bf23 AM |
49 | ${RELOCATING+*(.rodata)} |
50 | ${RELOCATING+*(.text.*)} | |
d70c5fc7 | 51 | *(.text) |
6c19b93b | 52 | ${RELOCATING+ _etext = . ; } |
d70c5fc7 NC |
53 | } ${RELOCATING+ > introm} |
54 | .data : | |
55 | { | |
56 | *(.data) | |
2bf2bf23 | 57 | ${RELOCATING+*(.data.*)} |
6c19b93b | 58 | |
d70c5fc7 NC |
59 | ${RELOCATING+ _edata = . ; } |
60 | } ${RELOCATING+ > dram} | |
61 | ||
62 | .bss : | |
63 | { | |
64 | ${RELOCATING+ _bss_start = . ;} | |
65 | *(.bss) | |
2bf2bf23 | 66 | ${RELOCATING+*(COMMON)} |
d70c5fc7 NC |
67 | ${RELOCATING+ _end = . ; } |
68 | } ${RELOCATING+ > dram} | |
69 | ||
6c19b93b AM |
70 | .ldata : |
71 | { | |
72 | *(.ldata) | |
73 | } ${RELOCATING+ > ldata} | |
d70c5fc7 | 74 | |
6c19b93b AM |
75 | .vects : |
76 | { | |
77 | *(.vects) | |
78 | } ${RELOCATING+ > vectarea} | |
d70c5fc7 NC |
79 | } |
80 | EOF |