document.write('
Data hosted with ♥ by Pastebin.com - Download Raw - See Original
  1. OUTPUT_FORMAT(srec)
  2. OUTPUT_ARCH(m68k)
  3. OUTPUT(rom.srec) /* The default filename, if -o is missing */
  4. SEARCH_DIR(.) /* include CRT0.S */
  5. /* removed libraries path pointing nowhere, might need to correct this... - JS */
  6.  
  7. /* Define where RAM and EPROM areas reside.
  8. * This gives the linker a rough possibility to detect errors while linking,
  9. * for example a .text-section growing bigger than 64k.
  10. * Don't rely too heavy on this, it can detect only very crude errors.
  11. */
  12. /* moved before sections -JS */
  13. MEMORY {
  14. rom : ORIGIN = 0x00080000, LENGTH = 64K
  15. ram : ORIGIN = 0x00000400, LENGTH = 511k /* after the 1k byte of vectors */
  16. }
  17.  
  18. SECTIONS
  19. {
  20. /* Text section at start of ROM
  21. * The next line tells the linker that the EPROM on my board starts
  22. * at 0x00080000. The command AT (0) places the code on address 0 in
  23. * the S-Record output file, ready for burning in an EPROM.
  24. */
  25. .text 0x00080000 : AT (0)
  26. {
  27. LONG (0x00080000) /* RESET SSP - JS */
  28. LONG (___main) /* RESET PC - JS */
  29. __s_text = . ; /* Define a symbol */
  30. * (.text)
  31. CONSTRUCTORS
  32. __e_text = . ; /* Those symbols are used by crt0.S */
  33. } > rom
  34.  
  35. /* Data section; initialisation data is stored immediately
  36. * after the text section in the ROM, but is loaded for
  37. * use in RAM
  38. * Again, the first address (0x00000400) tells the linker where
  39. * the RAM is mapped, while AT (SIZEOF(.text)) puts the initial data
  40. * into the output file right after the end of the .text section,
  41. * from where it can be copied into RAM on startup.
  42. */
  43.  
  44. .data 0x00000400 : AT (SIZEOF(.text))
  45. {
  46. __s_data = . ; /* Symbols, to know where to */
  47. *(.data)
  48. __e_data = . ; /* copy the data. */
  49. } > ram
  50.  
  51. /* BSS section:
  52. * 0x00000400 + SIZEOF(.data) places the .bss-section into the RAM
  53. * right after the .data-section. The defined symbols enable the
  54. * startup code to clear this RAM area.
  55. */
  56. .bss 0x00000400 + SIZEOF(.data) :
  57. {
  58. __s_bss = . ; /* We should be able */
  59. *(.bss)
  60. *(COMMON)
  61. __e_bss = . ; /* to clear the bss. */
  62. } > ram
  63. }
');