z80.sc 1006 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. # Copyright (C) 2014-2015 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. if [ x${LD_FLAG} = x ]
  7. then
  8. cat << EOF
  9. /* Copyright (C) 2014-2015 Free Software Foundation, Inc.
  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. /* Create a cp/m executable; load and execute at 0x100. */
  14. OUTPUT_FORMAT("binary")
  15. . = 0x100;
  16. __Ltext = .;
  17. ENTRY (__Ltext)
  18. EOF
  19. else
  20. echo "OUTPUT_FORMAT(\"${OUTPUT_FORMAT}\")"
  21. fi
  22. cat <<EOF
  23. OUTPUT_ARCH("${OUTPUT_ARCH}")
  24. SECTIONS
  25. {
  26. .text : {
  27. *(.text)
  28. *(text)
  29. ${RELOCATING+ __Htext = .;}
  30. }
  31. .data : {
  32. ${RELOCATING+ __Ldata = .;}
  33. *(.data)
  34. *(data)
  35. ${RELOCATING+ __Hdata = .;}
  36. }
  37. .bss : {
  38. ${RELOCATING+ __Lbss = .;}
  39. *(.bss)
  40. *(bss)
  41. ${RELOCATING+ __Hbss = .;}
  42. }
  43. }
  44. EOF