Advertisement
Guest User

jaguar-cart.ld

a guest
Jan 24th, 2022
38
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.53 KB | None | 0 0
  1. OUTPUT_ARCH(m68k)
  2. EXTERN (_start)
  3. ENTRY (_start)
  4. __DYNAMIC = 0;
  5.  
  6. /*
  7. * The memory map looks like this:
  8. * +--------------------+ <- 0x00002000
  9. * | .text |
  10. * | |
  11. * | _text_end |
  12. * +--------------------+
  13. * | .data | initialized data goes here
  14. * | |
  15. * | _data_end |
  16. * +--------------------+
  17. * | .bss |
  18. * | _bss_start | start of bss, cleared by crt0
  19. * | |
  20. * | _bss__end | start of heap, used by sbrk()
  21. * +--------------------+
  22. * . .
  23. * . .
  24. * . .
  25. * | _stack | top of stack
  26. * +--------------------+ <- 0x00200000
  27. */
  28.  
  29. MEMORY
  30. {
  31. ram (wx) : ORIGIN = 0x00002000, LENGTH = 0x001FE000
  32. }
  33.  
  34. /*
  35. * Allocate the stack to be at the top of memory, since the stack
  36. * grows down
  37. */
  38.  
  39. PROVIDE (__stack = 0x001FFFFC);
  40.  
  41. SECTIONS
  42. {
  43. .text 0x00002000 :
  44. {
  45. __text_start = .;
  46. *(.text)
  47. *(.text.*)
  48. *(.gnu.linkonce.t.*)
  49.  
  50. . = ALIGN(16);
  51. __INIT_SECTION__ = .;
  52. KEEP (*(.init))
  53. SHORT (0x4E75) /* rts */
  54. . = ALIGN(16);
  55. __FINI_SECTION__ = .;
  56. KEEP (*(.fini))
  57. SHORT (0x4E75) /* rts */
  58.  
  59. *(.eh_frame_hdr)
  60. KEEP (*(.eh_frame))
  61. *(.gcc_except_table)
  62. KEEP (*(.jcr))
  63.  
  64. . = ALIGN(16);
  65. __CTOR_LIST__ = .;
  66. ___CTOR_LIST__ = .;
  67. LONG((__CTOR_END__ - __CTOR_LIST__) / 4 - 2)
  68. KEEP (*(SORT(.ctors.*)))
  69. KEEP (*(.ctors))
  70. LONG(0)
  71. __CTOR_END__ = .;
  72.  
  73. . = ALIGN(16);
  74. __DTOR_LIST__ = .;
  75. ___DTOR_LIST__ = .;
  76. LONG((__DTOR_END__ - __DTOR_LIST__) / 4 - 2)
  77. KEEP (*(SORT(.dtors.*)))
  78. KEEP (*(.dtors))
  79. LONG(0)
  80. __DTOR_END__ = .;
  81.  
  82. *(.rdata)
  83. *(.rodata)
  84. *(.rodata.*)
  85. *(.gnu.linkonce.r.*)
  86. . = ALIGN(16);
  87. __text_end = .;
  88. } > ram
  89. __text_size = __text_end - __text_start;
  90.  
  91. .data :
  92. {
  93. __data_start = .;
  94. *(.data)
  95. *(.data.*)
  96. *(.gnu.linkonce.d.*)
  97. CONSTRUCTORS
  98.  
  99. *(.lit8)
  100. *(.lit4)
  101. *(.sdata)
  102. *(.sdata.*)
  103. *(.gnu.linkonce.s.*)
  104. . = ALIGN(8);
  105. __data_end = .;
  106. } > ram
  107. __data_size = __data_end - __data_start;
  108.  
  109. .bss :
  110. {
  111. __bss_start = .;
  112. *(.bss)
  113. *(.bss.*)
  114. *(.gnu.linkonce.b.*)
  115. *(.sbss)
  116. *(.sbss.*)
  117. *(.gnu.linkonce.sb.*)
  118. *(.scommon)
  119. *(COMMON)
  120. . = ALIGN(8);
  121. end = .;
  122. _end = end;
  123. __end = _end;
  124. __bss_end = .;
  125. } > ram
  126. __bss_size = __bss_end - __bss_start;
  127.  
  128. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement