lscript.ld 6.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312
  1. /*******************************************************************/
  2. /* */
  3. /* This file is automatically generated by linker script generator.*/
  4. /* */
  5. /* Version: 2018.3 */
  6. /* */
  7. /* Copyright (c) 2010-2016 Xilinx, Inc. All rights reserved. */
  8. /* */
  9. /* Description : Cortex-A9 Linker Script */
  10. /* */
  11. /*******************************************************************/
  12. _STACK_SIZE = DEFINED(_STACK_SIZE) ? _STACK_SIZE : 0x2000;
  13. _HEAP_SIZE = DEFINED(_HEAP_SIZE) ? _HEAP_SIZE : 0x2000;
  14. _ABORT_STACK_SIZE = DEFINED(_ABORT_STACK_SIZE) ? _ABORT_STACK_SIZE : 1024;
  15. _SUPERVISOR_STACK_SIZE = DEFINED(_SUPERVISOR_STACK_SIZE) ? _SUPERVISOR_STACK_SIZE : 2048;
  16. _IRQ_STACK_SIZE = DEFINED(_IRQ_STACK_SIZE) ? _IRQ_STACK_SIZE : 1024;
  17. _FIQ_STACK_SIZE = DEFINED(_FIQ_STACK_SIZE) ? _FIQ_STACK_SIZE : 1024;
  18. _UNDEF_STACK_SIZE = DEFINED(_UNDEF_STACK_SIZE) ? _UNDEF_STACK_SIZE : 1024;
  19. /* Define Memories in the system */
  20. MEMORY
  21. {
  22. ps7_ddr_0 : ORIGIN = 0x100000, LENGTH = 0x20000000
  23. ps7_qspi_linear_0 : ORIGIN = 0xFC000000, LENGTH = 0x1000000
  24. ps7_ram_0 : ORIGIN = 0x0, LENGTH = 0x30000
  25. ps7_ram_1 : ORIGIN = 0xFFFF0000, LENGTH = 0xFE00
  26. }
  27. /* Specify the default entry point to the program */
  28. ENTRY(_reset)
  29. /* Define the sections, and where they are mapped in memory */
  30. SECTIONS
  31. {
  32. .text : {
  33. __text_start = .;
  34. KEEP (*(.vectors))
  35. *(.boot)
  36. *(.text)
  37. *(.text.*)
  38. /* section information for finsh shell */
  39. . = ALIGN(4);
  40. __fsymtab_start = .;
  41. KEEP(*(FSymTab))
  42. __fsymtab_end = .;
  43. . = ALIGN(4);
  44. __vsymtab_start = .;
  45. KEEP(*(VSymTab))
  46. __vsymtab_end = .;
  47. . = ALIGN(4);
  48. /* section information for modules */
  49. . = ALIGN(4);
  50. __rtmsymtab_start = .;
  51. KEEP(*(RTMSymTab))
  52. __rtmsymtab_end = .;
  53. /* section information for initialization */
  54. . = ALIGN(4);
  55. __rt_init_start = .;
  56. KEEP(*(SORT(.rti_fn*)))
  57. __rt_init_end = .;
  58. *(.gnu.linkonce.t.*)
  59. *(.plt)
  60. *(.gnu_warning)
  61. *(.gcc_execpt_table)
  62. *(.glue_7)
  63. *(.glue_7t)
  64. *(.vfp11_veneer)
  65. *(.ARM.extab)
  66. *(.gnu.linkonce.armextab.*)
  67. } > ps7_ddr_0
  68. .init : {
  69. KEEP (*(.init))
  70. } > ps7_ddr_0
  71. .fini : {
  72. KEEP (*(.fini))
  73. } > ps7_ddr_0
  74. .rodata : {
  75. __rodata_start = .;
  76. *(.rodata)
  77. *(.rodata.*)
  78. *(.gnu.linkonce.r.*)
  79. __rodata_end = .;
  80. } > ps7_ddr_0
  81. .rodata1 : {
  82. __rodata1_start = .;
  83. *(.rodata1)
  84. *(.rodata1.*)
  85. __rodata1_end = .;
  86. } > ps7_ddr_0
  87. .sdata2 : {
  88. __sdata2_start = .;
  89. *(.sdata2)
  90. *(.sdata2.*)
  91. *(.gnu.linkonce.s2.*)
  92. __sdata2_end = .;
  93. } > ps7_ddr_0
  94. .sbss2 : {
  95. __sbss2_start = .;
  96. *(.sbss2)
  97. *(.sbss2.*)
  98. *(.gnu.linkonce.sb2.*)
  99. __sbss2_end = .;
  100. } > ps7_ddr_0
  101. .data : {
  102. __data_start = .;
  103. *(.data)
  104. *(.data.*)
  105. *(.gnu.linkonce.d.*)
  106. *(.jcr)
  107. *(.got)
  108. *(.got.plt)
  109. __data_end = .;
  110. } > ps7_ddr_0
  111. .data1 : {
  112. __data1_start = .;
  113. *(.data1)
  114. *(.data1.*)
  115. __data1_end = .;
  116. } > ps7_ddr_0
  117. .got : {
  118. *(.got)
  119. } > ps7_ddr_0
  120. .ctors : {
  121. PROVIDE(__ctors_start__ = .);
  122. KEEP(*(SORT(.ctors.*)))
  123. KEEP(*(.ctors))
  124. KEEP (*(SORT(.init_array.*)))
  125. KEEP (*(.init_array))
  126. PROVIDE(__ctors_end__ = .);
  127. } > ps7_ddr_0
  128. .dtors : {
  129. __DTOR_LIST__ = .;
  130. ___DTORS_LIST___ = .;
  131. KEEP (*crtbegin.o(.dtors))
  132. KEEP (*(EXCLUDE_FILE(*crtend.o) .dtors))
  133. KEEP (*(SORT(.dtors.*)))
  134. KEEP (*(.dtors))
  135. __DTOR_END__ = .;
  136. ___DTORS_END___ = .;
  137. } > ps7_ddr_0
  138. .fixup : {
  139. __fixup_start = .;
  140. *(.fixup)
  141. __fixup_end = .;
  142. } > ps7_ddr_0
  143. .eh_frame : {
  144. *(.eh_frame)
  145. } > ps7_ddr_0
  146. .eh_framehdr : {
  147. __eh_framehdr_start = .;
  148. *(.eh_framehdr)
  149. __eh_framehdr_end = .;
  150. } > ps7_ddr_0
  151. .gcc_except_table : {
  152. *(.gcc_except_table)
  153. } > ps7_ddr_0
  154. .mmu_tbl (ALIGN(16384)) : {
  155. __mmu_tbl_start = .;
  156. *(.mmu_tbl)
  157. __mmu_tbl_end = .;
  158. } > ps7_ddr_0
  159. .ARM.exidx : {
  160. __exidx_start = .;
  161. *(.ARM.exidx*)
  162. *(.gnu.linkonce.armexidix.*.*)
  163. __exidx_end = .;
  164. } > ps7_ddr_0
  165. .preinit_array : {
  166. __preinit_array_start = .;
  167. KEEP (*(SORT(.preinit_array.*)))
  168. KEEP (*(.preinit_array))
  169. __preinit_array_end = .;
  170. } > ps7_ddr_0
  171. .init_array : {
  172. __init_array_start = .;
  173. KEEP (*(SORT(.init_array.*)))
  174. KEEP (*(.init_array))
  175. __init_array_end = .;
  176. } > ps7_ddr_0
  177. .fini_array : {
  178. __fini_array_start = .;
  179. KEEP (*(SORT(.fini_array.*)))
  180. KEEP (*(.fini_array))
  181. __fini_array_end = .;
  182. } > ps7_ddr_0
  183. .ARM.attributes : {
  184. __ARM.attributes_start = .;
  185. *(.ARM.attributes)
  186. __ARM.attributes_end = .;
  187. } > ps7_ddr_0
  188. .sdata : {
  189. __sdata_start = .;
  190. *(.sdata)
  191. *(.sdata.*)
  192. *(.gnu.linkonce.s.*)
  193. __sdata_end = .;
  194. } > ps7_ddr_0
  195. .sbss (NOLOAD) : {
  196. __sbss_start = .;
  197. *(.sbss)
  198. *(.sbss.*)
  199. *(.gnu.linkonce.sb.*)
  200. __sbss_end = .;
  201. } > ps7_ddr_0
  202. .tdata : {
  203. __tdata_start = .;
  204. *(.tdata)
  205. *(.tdata.*)
  206. *(.gnu.linkonce.td.*)
  207. __tdata_end = .;
  208. } > ps7_ddr_0
  209. .tbss : {
  210. __tbss_start = .;
  211. *(.tbss)
  212. *(.tbss.*)
  213. *(.gnu.linkonce.tb.*)
  214. __tbss_end = .;
  215. } > ps7_ddr_0
  216. .bss (NOLOAD) : {
  217. __bss_start = .;
  218. *(.bss)
  219. *(.bss.*)
  220. *(.gnu.linkonce.b.*)
  221. *(COMMON)
  222. __bss_end = .;
  223. _exit = .;
  224. } > ps7_ddr_0
  225. _SDA_BASE_ = __sdata_start + ((__sbss_end - __sdata_start) / 2 );
  226. _SDA2_BASE_ = __sdata2_start + ((__sbss2_end - __sdata2_start) / 2 );
  227. /* Generate Stack and Heap definitions */
  228. .heap (NOLOAD) : {
  229. . = ALIGN(16);
  230. _heap = .;
  231. HeapBase = .;
  232. _heap_start = .;
  233. . += _HEAP_SIZE;
  234. _heap_end = .;
  235. HeapLimit = .;
  236. } > ps7_ddr_0
  237. .stack (NOLOAD) : {
  238. . = ALIGN(16);
  239. _stack_end = .;
  240. . += _STACK_SIZE;
  241. . = ALIGN(16);
  242. _stack = .;
  243. __stack = _stack;
  244. . = ALIGN(16);
  245. _irq_stack_end = .;
  246. . += _IRQ_STACK_SIZE;
  247. . = ALIGN(16);
  248. __irq_stack = .;
  249. _supervisor_stack_end = .;
  250. . += _SUPERVISOR_STACK_SIZE;
  251. . = ALIGN(16);
  252. __supervisor_stack = .;
  253. _abort_stack_end = .;
  254. . += _ABORT_STACK_SIZE;
  255. . = ALIGN(16);
  256. __abort_stack = .;
  257. _fiq_stack_end = .;
  258. . += _FIQ_STACK_SIZE;
  259. . = ALIGN(16);
  260. __fiq_stack = .;
  261. _undef_stack_end = .;
  262. . += _UNDEF_STACK_SIZE;
  263. . = ALIGN(16);
  264. __undef_stack = .;
  265. } > ps7_ddr_0
  266. _end = .;
  267. }