eagle.app.v6.ld 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187
  1. /* This linker script generated from xt-genldscripts.tpp for LSP . */
  2. /* Linker Script for ld -N */
  3. MEMORY
  4. {
  5. dport0_0_seg : org = 0x3FF00000, len = 0x10
  6. dram0_0_seg : org = 0x3FFE8000, len = 0x14000
  7. iram1_0_seg : org = 0x40100000, len = 0x8000
  8. irom0_0_seg : org = 0x40210000, len = 0x80000
  9. }
  10. PHDRS
  11. {
  12. dport0_0_phdr PT_LOAD;
  13. dram0_0_phdr PT_LOAD;
  14. dram0_0_bss_phdr PT_LOAD;
  15. iram1_0_phdr PT_LOAD;
  16. irom0_0_phdr PT_LOAD;
  17. }
  18. /* Default entry point: */
  19. ENTRY(user_start_trampoline)
  20. PROVIDE(_memmap_vecbase_reset = 0x40000000);
  21. /* Various memory-map dependent cache attribute settings: */
  22. _memmap_cacheattr_wb_base = 0x00000110;
  23. _memmap_cacheattr_wt_base = 0x00000110;
  24. _memmap_cacheattr_bp_base = 0x00000220;
  25. _memmap_cacheattr_unused_mask = 0xFFFFF00F;
  26. _memmap_cacheattr_wb_trapnull = 0x2222211F;
  27. _memmap_cacheattr_wba_trapnull = 0x2222211F;
  28. _memmap_cacheattr_wbna_trapnull = 0x2222211F;
  29. _memmap_cacheattr_wt_trapnull = 0x2222211F;
  30. _memmap_cacheattr_bp_trapnull = 0x2222222F;
  31. _memmap_cacheattr_wb_strict = 0xFFFFF11F;
  32. _memmap_cacheattr_wt_strict = 0xFFFFF11F;
  33. _memmap_cacheattr_bp_strict = 0xFFFFF22F;
  34. _memmap_cacheattr_wb_allvalid = 0x22222112;
  35. _memmap_cacheattr_wt_allvalid = 0x22222112;
  36. _memmap_cacheattr_bp_allvalid = 0x22222222;
  37. PROVIDE(_memmap_cacheattr_reset = _memmap_cacheattr_wb_trapnull);
  38. SECTIONS
  39. {
  40. .dport0.rodata : ALIGN(4)
  41. {
  42. _dport0_rodata_start = ABSOLUTE(.);
  43. *(.dport0.rodata)
  44. *(.dport.rodata)
  45. _dport0_rodata_end = ABSOLUTE(.);
  46. } >dport0_0_seg :dport0_0_phdr
  47. .dport0.literal : ALIGN(4)
  48. {
  49. _dport0_literal_start = ABSOLUTE(.);
  50. *(.dport0.literal)
  51. *(.dport.literal)
  52. _dport0_literal_end = ABSOLUTE(.);
  53. } >dport0_0_seg :dport0_0_phdr
  54. .dport0.data : ALIGN(4)
  55. {
  56. _dport0_data_start = ABSOLUTE(.);
  57. *(.dport0.data)
  58. *(.dport.data)
  59. _dport0_data_end = ABSOLUTE(.);
  60. } >dport0_0_seg :dport0_0_phdr
  61. .irom0.text : ALIGN(4)
  62. {
  63. _irom0_text_start = ABSOLUTE(.);
  64. *(.irom0.literal .irom.literal .irom.text.literal .irom0.text .irom.text)
  65. *(.literal.* .text.*)
  66. /* Trade some performance for lots of ram. At the time of writing the
  67. * available Lua heap went from 18248 to 34704. */
  68. *(.rodata*)
  69. _irom0_text_end = ABSOLUTE(.);
  70. _flash_used_end = ABSOLUTE(.);
  71. } >irom0_0_seg :irom0_0_phdr
  72. .text : ALIGN(4)
  73. {
  74. _stext = .;
  75. _text_start = ABSOLUTE(.);
  76. *(.entry.text)
  77. *(.init.literal)
  78. *(.init)
  79. /* *(.literal .text .literal.* .text.* .stub .gnu.warning .gnu.linkonce.literal.* .gnu.linkonce.t.*.literal .gnu.linkonce.t.*) */
  80. *(.literal .text .iram0.text .stub .gnu.warning .gnu.linkonce.literal.* .gnu.linkonce.t.*.literal .gnu.linkonce.t.*)
  81. *(.fini.literal)
  82. *(.fini)
  83. *(.gnu.version)
  84. _text_end = ABSOLUTE(.);
  85. _etext = .;
  86. } >iram1_0_seg :iram1_0_phdr
  87. .lit4 : ALIGN(4)
  88. {
  89. _lit4_start = ABSOLUTE(.);
  90. *(*.lit4)
  91. *(.lit4.*)
  92. *(.gnu.linkonce.lit4.*)
  93. _lit4_end = ABSOLUTE(.);
  94. } >iram1_0_seg :iram1_0_phdr
  95. .data : ALIGN(4)
  96. {
  97. _data_start = ABSOLUTE(.);
  98. *(.data)
  99. *(.data.*)
  100. *(.gnu.linkonce.d.*)
  101. *(.data1)
  102. *(.sdata)
  103. *(.sdata.*)
  104. *(.gnu.linkonce.s.*)
  105. *(.sdata2)
  106. *(.sdata2.*)
  107. *(.gnu.linkonce.s2.*)
  108. *(.jcr)
  109. _data_end = ABSOLUTE(.);
  110. } >dram0_0_seg :dram0_0_phdr
  111. .rodata : ALIGN(4)
  112. {
  113. _rodata_start = ABSOLUTE(.);
  114. *(.gnu.linkonce.r.*)
  115. __XT_EXCEPTION_TABLE__ = ABSOLUTE(.);
  116. *(.xt_except_table)
  117. *(.gcc_except_table)
  118. *(.gnu.linkonce.e.*)
  119. *(.gnu.version_r)
  120. *(.eh_frame)
  121. /* C++ constructor and destructor tables, properly ordered: */
  122. KEEP (*crtbegin.o(.ctors))
  123. KEEP (*(EXCLUDE_FILE (*crtend.o) .ctors))
  124. KEEP (*(SORT(.ctors.*)))
  125. KEEP (*(.ctors))
  126. KEEP (*crtbegin.o(.dtors))
  127. KEEP (*(EXCLUDE_FILE (*crtend.o) .dtors))
  128. KEEP (*(SORT(.dtors.*)))
  129. KEEP (*(.dtors))
  130. /* C++ exception handlers table: */
  131. __XT_EXCEPTION_DESCS__ = ABSOLUTE(.);
  132. *(.xt_except_desc)
  133. *(.gnu.linkonce.h.*)
  134. __XT_EXCEPTION_DESCS_END__ = ABSOLUTE(.);
  135. *(.xt_except_desc_end)
  136. *(.dynamic)
  137. *(.gnu.version_d)
  138. . = ALIGN(4); /* this table MUST be 4-byte aligned */
  139. _bss_table_start = ABSOLUTE(.);
  140. LONG(_bss_start)
  141. LONG(_bss_end)
  142. _bss_table_end = ABSOLUTE(.);
  143. _rodata_end = ABSOLUTE(.);
  144. } >dram0_0_seg :dram0_0_phdr
  145. .bss ALIGN(8) (NOLOAD) : ALIGN(4)
  146. {
  147. . = ALIGN (8);
  148. _bss_start = ABSOLUTE(.);
  149. *(.dynsbss)
  150. *(.sbss)
  151. *(.sbss.*)
  152. *(.gnu.linkonce.sb.*)
  153. *(.scommon)
  154. *(.sbss2)
  155. *(.sbss2.*)
  156. *(.gnu.linkonce.sb2.*)
  157. *(.dynbss)
  158. *(.bss)
  159. *(.bss.*)
  160. *(.gnu.linkonce.b.*)
  161. *(COMMON)
  162. . = ALIGN (8);
  163. _bss_end = ABSOLUTE(.);
  164. _heap_start = ABSOLUTE(.);
  165. /* _stack_sentry = ALIGN(0x8); */
  166. } >dram0_0_seg :dram0_0_bss_phdr
  167. /* __stack = 0x3ffc8000; */
  168. }
  169. /* get ROM code address */
  170. INCLUDE "../ld/eagle.rom.addr.v6.ld"