Commit | Line | Data |
---|---|---|
2571583a | 1 | # Copyright (C) 2014-2017 Free Software Foundation, Inc. |
985743c7 NC |
2 | # |
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 | ||
40a633d5 NC |
7 | TORS=".tors : |
8 | { | |
9 | ___ctors = . ; | |
10 | *(.ctors) | |
11 | ___ctors_end = . ; | |
12 | ___dtors = . ; | |
13 | *(.dtors) | |
14 | ___dtors_end = . ; | |
15 | } > ram" | |
16 | ||
252b5132 | 17 | cat <<EOF |
2571583a | 18 | /* Copyright (C) 2014-2017 Free Software Foundation, Inc. |
985743c7 NC |
19 | |
20 | Copying and distribution of this script, with or without modification, | |
21 | are permitted in any medium without royalty provided the copyright | |
22 | notice and this notice are preserved. */ | |
23 | ||
252b5132 RH |
24 | OUTPUT_FORMAT("${OUTPUT_FORMAT}") |
25 | OUTPUT_ARCH(${ARCH}) | |
26 | ||
40a633d5 NC |
27 | MEMORY |
28 | { | |
252b5132 | 29 | ram : o = 0x1000, l = 512k |
40a633d5 | 30 | } |
252b5132 RH |
31 | |
32 | SECTIONS | |
33 | { | |
34 | .text : | |
35 | { | |
36 | *(.text) | |
37 | *(.strings) | |
40a633d5 | 38 | ${RELOCATING+ _etext = . ; } |
252b5132 RH |
39 | } ${RELOCATING+ > ram} |
40 | ||
40a633d5 | 41 | ${CONSTRUCTING+${TORS}} |
252b5132 RH |
42 | |
43 | .data : | |
44 | { | |
40a633d5 NC |
45 | *(.data) |
46 | ${RELOCATING+ _edata = . ; } | |
252b5132 | 47 | } ${RELOCATING+ > ram} |
40a633d5 | 48 | |
252b5132 RH |
49 | .bss : |
50 | { | |
40a633d5 NC |
51 | ${RELOCATING+ _bss_start = . ; } |
52 | *(.bss) | |
53 | *(COMMON) | |
54 | ${RELOCATING+ _end = . ; } | |
252b5132 | 55 | } ${RELOCATING+ >ram} |
40a633d5 NC |
56 | |
57 | .stack ${RELOCATING+ 0x30000 } : | |
252b5132 | 58 | { |
40a633d5 NC |
59 | ${RELOCATING+ _stack = . ; } |
60 | *(.stack) | |
252b5132 | 61 | } ${RELOCATING+ > ram} |
40a633d5 NC |
62 | |
63 | .stab . (NOLOAD) : | |
64 | { | |
65 | [ .stab ] | |
66 | } | |
67 | ||
68 | .stabstr . (NOLOAD) : | |
69 | { | |
70 | [ .stabstr ] | |
71 | } | |
252b5132 RH |
72 | } |
73 | EOF | |
74 | ||
75 | ||
76 | ||
77 |