Commit | Line | Data |
---|---|---|
82704155 | 1 | # Copyright (C) 2014-2019 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 |
82704155 | 8 | /* Copyright (C) 2014-2019 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 | |
23 | vectarea : o =0x00000, l = 0x0300 | |
24 | ||
d70c5fc7 NC |
25 | introm : o = 0x00400, l = 0x16000 |
26 | /* The stack starts at the top of main ram. */ | |
6c19b93b | 27 | |
d70c5fc7 NC |
28 | dram : o = 0x8000 , l = 0xffff |
29 | /* At the very top of the address space is the 8-bit area. */ | |
6c19b93b AM |
30 | |
31 | ldata : o =0x4000 ,l = 0x0200 | |
d70c5fc7 NC |
32 | } |
33 | ||
550892eb | 34 | EOF |
2bf2bf23 AM |
35 | |
36 | cat <<EOF | |
d70c5fc7 NC |
37 | SECTIONS |
38 | { | |
39 | .init : | |
6c19b93b | 40 | { |
2d3181c7 AM |
41 | KEEP (*(SORT_NONE(.init))) |
42 | ${RELOCATING+KEEP (*(SORT_NONE(.fini)))} | |
6c19b93b AM |
43 | } ${RELOCATING+ >introm} |
44 | ||
d70c5fc7 NC |
45 | .text : |
46 | { | |
2bf2bf23 AM |
47 | ${RELOCATING+*(.rodata)} |
48 | ${RELOCATING+*(.text.*)} | |
d70c5fc7 | 49 | *(.text) |
6c19b93b | 50 | ${RELOCATING+ _etext = . ; } |
d70c5fc7 NC |
51 | } ${RELOCATING+ > introm} |
52 | .data : | |
53 | { | |
54 | *(.data) | |
2bf2bf23 | 55 | ${RELOCATING+*(.data.*)} |
6c19b93b | 56 | |
d70c5fc7 NC |
57 | ${RELOCATING+ _edata = . ; } |
58 | } ${RELOCATING+ > dram} | |
59 | ||
60 | .bss : | |
61 | { | |
62 | ${RELOCATING+ _bss_start = . ;} | |
63 | *(.bss) | |
2bf2bf23 | 64 | ${RELOCATING+*(COMMON)} |
d70c5fc7 NC |
65 | ${RELOCATING+ _end = . ; } |
66 | } ${RELOCATING+ > dram} | |
67 | ||
6c19b93b AM |
68 | .ldata : |
69 | { | |
70 | *(.ldata) | |
71 | } ${RELOCATING+ > ldata} | |
d70c5fc7 | 72 | |
6c19b93b AM |
73 | |
74 | .vects : | |
75 | { | |
76 | *(.vects) | |
77 | } ${RELOCATING+ > vectarea} | |
d70c5fc7 NC |
78 | |
79 | } | |
80 | EOF |