1 # Copyright (C) 2014 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 if [ x${LD_FLAG} = x ] 8 then 9 cat << EOF 10 /* Copyright (C) 2014 Free Software Foundation, Inc. 11 12 Copying and distribution of this script, with or without modification, 13 are permitted in any medium without royalty provided the copyright 14 notice and this notice are preserved. */ 15 16 /* Create a cp/m executable; load and execute at 0x100. */ 17 OUTPUT_FORMAT("binary") 18 . = 0x100; 19 __Ltext = .; 20 ENTRY (__Ltext) 21 EOF 22 else 23 echo "OUTPUT_FORMAT(\"${OUTPUT_FORMAT}\")" 24 fi 25 cat <<EOF 26 OUTPUT_ARCH("${OUTPUT_ARCH}") 27 SECTIONS 28 { 29 .text : { 30 *(.text) 31 *(text) 32 ${RELOCATING+ __Htext = .;} 33 } 34 .data : { 35 ${RELOCATING+ __Ldata = .;} 36 *(.data) 37 *(data) 38 ${RELOCATING+ __Hdata = .;} 39 } 40 .bss : { 41 ${RELOCATING+ __Lbss = .;} 42 *(.bss) 43 *(bss) 44 ${RELOCATING+ __Hbss = .;} 45 } 46 } 47 EOF 48