Commit | Line | Data |
---|---|---|
219d1afa | 1 | # Copyright (C) 2014-2018 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 | ||
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 |
219d1afa | 13 | /* Copyright (C) 2014-2018 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 | ||
6c19b93b AM |
24 | SECTIONS |
25 | { | |
252b5132 RH |
26 | .text ${RELOCATING+ (0x20007 + SIZEOF_HEADERS) &~ 7} : |
27 | { | |
28 | ${RELOCATING+ __.text.start = .}; | |
29 | ${RELOCATING+ __.init.start = .}; | |
30 | ${RELOCATING+ *(.init)} | |
31 | ${RELOCATING+ __.init.end = .}; | |
6c19b93b | 32 | *(.text) |
252b5132 RH |
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 = .}; | |
6c19b93b | 42 | } |
252b5132 | 43 | .data ${RELOCATING+ NEXT (0x400000) + ((SIZEOF(.text) + ADDR(.text)) % 0x2000)} : |
6c19b93b | 44 | { |
252b5132 RH |
45 | *(.data) |
46 | ${RELOCATING+_edata = .}; | |
6c19b93b | 47 | } |
252b5132 | 48 | .bss ${RELOCATING+ SIZEOF(.data) + ADDR(.data)} : |
6c19b93b AM |
49 | { |
50 | *(.bss) | |
51 | *(COMMON) | |
252b5132 RH |
52 | ${RELOCATING+ _end = .}; |
53 | ${RELOCATING+ __end = .}; | |
54 | } | |
55 | ${RELOCATING- ${INIT}} | |
56 | ${RELOCATING- ${FINI}} | |
6c19b93b | 57 | .comment 0 ${RELOCATING+(NOLOAD)} : |
252b5132 RH |
58 | { |
59 | *(.comment) | |
60 | } | |
61 | } | |
62 | EOF |