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