Commit | Line | Data |
---|---|---|
b90efa5b | 1 | # Copyright (C) 2014-2015 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 | ||
252b5132 RH |
7 | # These are substituted in as variables in order to get '}' in a shell |
8 | # conditional expansion. | |
9 | INIT='.init : { *(.init) }' | |
10 | FINI='.fini : { *(.fini) }' | |
985743c7 | 11 | |
252b5132 | 12 | cat <<EOF |
b90efa5b | 13 | /* Copyright (C) 2014-2015 Free Software Foundation, Inc. |
985743c7 NC |
14 | |
15 | Copying and distribution of this script, with or without modification, | |
16 | are permitted in any medium without royalty provided the copyright | |
17 | notice and this notice are preserved. */ | |
18 | ||
252b5132 RH |
19 | OUTPUT_FORMAT("${OUTPUT_FORMAT}") |
20 | OUTPUT_ARCH(${ARCH}) | |
596d6d91 | 21 | ${RELOCATING+ENTRY (__start)} |
252b5132 RH |
22 | ${RELOCATING+${LIB_SEARCH_DIRS}} |
23 | ||
24 | SECTIONS | |
25 | { | |
26 | .text ${RELOCATING+ (0x20007 + SIZEOF_HEADERS) &~ 7} : | |
27 | { | |
28 | ${RELOCATING+ __.text.start = .}; | |
29 | ${RELOCATING+ __.init.start = .}; | |
30 | ${RELOCATING+ *(.init)} | |
31 | ${RELOCATING+ __.init.end = .}; | |
32 | *(.text) | |
33 | ${RELOCATING+ __.tdesc_start = .}; | |
34 | ${RELOCATING+ *(.tdesc)} | |
35 | ${RELOCATING+ __.text_end = .} ; | |
36 | ${RELOCATING+ __.initp.start = .}; | |
37 | ${RELOCATING+ __.initp.end = .}; | |
38 | ${RELOCATING+ __.fini_start = .}; | |
39 | ${RELOCATING+ *(.fini) } | |
40 | ${RELOCATING+ __.fini_end = .}; | |
41 | ${RELOCATING+_etext = .}; | |
42 | } | |
43 | .data ${RELOCATING+ NEXT (0x400000) + ((SIZEOF(.text) + ADDR(.text)) % 0x2000)} : | |
44 | { | |
45 | *(.data) | |
46 | ${RELOCATING+_edata = .}; | |
47 | } | |
48 | .bss ${RELOCATING+ SIZEOF(.data) + ADDR(.data)} : | |
49 | { | |
50 | *(.bss) | |
51 | *(COMMON) | |
52 | ${RELOCATING+ _end = .}; | |
53 | ${RELOCATING+ __end = .}; | |
54 | } | |
55 | ${RELOCATING- ${INIT}} | |
56 | ${RELOCATING- ${FINI}} | |
57 | .comment 0 ${RELOCATING+(NOLOAD)} : | |
58 | { | |
59 | *(.comment) | |
60 | } | |
61 | } | |
62 | EOF |