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 7cat <<EOF 8/* Copyright (C) 2014-2016 Free Software Foundation, Inc. 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 14OUTPUT_FORMAT("${OUTPUT_FORMAT}") 15${LIB_SEARCH_DIRS} 16PROVIDE (__stack = 0); 17SECTIONS 18{ 19 .text ${RELOCATING+ 0x1000000} : { 20 *(.text) 21 ${CONSTRUCTING+ . = ALIGN(4);} 22 ${RELOCATING+ etext = .;} 23 ${CONSTRUCTING+ __CTOR_LIST__ = .;} 24 ${CONSTRUCTING+ LONG((__CTOR_END__ - __CTOR_LIST__) / 4 - 2)} 25 ${CONSTRUCTING+ *(.ctors)} 26 ${CONSTRUCTING+ LONG(0)} 27 ${CONSTRUCTING+ __CTOR_END__ = .;} 28 ${CONSTRUCTING+ __DTOR_LIST__ = .;} 29 ${CONSTRUCTING+ LONG((__DTOR_END__ - __DTOR_LIST__) / 4 - 2)} 30 ${CONSTRUCTING+ *(.dtors)} 31 ${CONSTRUCTING+ LONG(0)} 32 ${CONSTRUCTING+ __DTOR_END__ = .;} 33 } 34 .data : { 35 *(.data) 36 ${RELOCATING+ edata = .}; 37 } 38 .bss : { 39 ${RELOCATING+ __bss_start = .}; 40 *(.bss) 41 *(COMMON) 42 ${RELOCATING+ end = ALIGN(0x8)}; 43 ${RELOCATING+ _end = ALIGN(0x8)}; 44 } 45 .stab 0 ${RELOCATING+(NOLOAD)} : 46 { 47 [ .stab ] 48 } 49 .stabstr 0 ${RELOCATING+(NOLOAD)} : 50 { 51 [ .stabstr ] 52 } 53} 54EOF 55