link.lds 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206
  1. /*
  2. * linker script for STM32H750XBHx with GNU ld
  3. */
  4. /* Program Entry, set to mark it as "used" and avoid gc */
  5. MEMORY
  6. {
  7. ROM (rx) : ORIGIN =0x90000000,LENGTH =8192k
  8. RAM (rw) : ORIGIN =0x24000000,LENGTH =512k
  9. RxDecripSection (rw) : ORIGIN =0x30040000,LENGTH =32k
  10. TxDecripSection (rw) : ORIGIN =0x30040060,LENGTH =32k
  11. RxArraySection (rw) : ORIGIN =0x30040200,LENGTH =32k
  12. }
  13. ENTRY(Reset_Handler)
  14. _system_stack_size = 0x400;
  15. SECTIONS
  16. {
  17. .text :
  18. {
  19. . = ALIGN(4);
  20. _stext = .;
  21. KEEP(*(.isr_vector)) /* Startup code */
  22. . = ALIGN(4);
  23. *(.text) /* remaining code */
  24. *(.text.*) /* remaining code */
  25. *(.rodata) /* read-only data (constants) */
  26. *(.rodata*)
  27. *(.glue_7)
  28. *(.glue_7t)
  29. *(.gnu.linkonce.t*)
  30. /* section information for finsh shell */
  31. . = ALIGN(4);
  32. __fsymtab_start = .;
  33. KEEP(*(FSymTab))
  34. __fsymtab_end = .;
  35. . = ALIGN(4);
  36. __vsymtab_start = .;
  37. KEEP(*(VSymTab))
  38. __vsymtab_end = .;
  39. /* section information for utest */
  40. . = ALIGN(4);
  41. __rt_utest_tc_tab_start = .;
  42. KEEP(*(UtestTcTab))
  43. __rt_utest_tc_tab_end = .;
  44. /* section information for at server */
  45. . = ALIGN(4);
  46. __rtatcmdtab_start = .;
  47. KEEP(*(RtAtCmdTab))
  48. __rtatcmdtab_end = .;
  49. . = ALIGN(4);
  50. /* section information for modules */
  51. . = ALIGN(4);
  52. __rtmsymtab_start = .;
  53. KEEP(*(RTMSymTab))
  54. __rtmsymtab_end = .;
  55. /* section information for initial. */
  56. . = ALIGN(4);
  57. __rt_init_start = .;
  58. KEEP(*(SORT(.rti_fn*)))
  59. __rt_init_end = .;
  60. . = ALIGN(4);
  61. PROVIDE(__ctors_start__ = .);
  62. KEEP (*(SORT(.init_array.*)))
  63. KEEP (*(.init_array))
  64. PROVIDE(__ctors_end__ = .);
  65. . = ALIGN(4);
  66. _etext = .;
  67. } > ROM = 0
  68. /* .ARM.exidx is sorted, so has to go in its own output section. */
  69. __exidx_start = .;
  70. .ARM.exidx :
  71. {
  72. *(.ARM.exidx* .gnu.linkonce.armexidx.*)
  73. /* This is used by the startup in order to initialize the .data secion */
  74. _sidata = .;
  75. } > ROM
  76. __exidx_end = .;
  77. /* .data section which is used for initialized data */
  78. .data : AT (_sidata)
  79. {
  80. . = ALIGN(4);
  81. /* This is used by the startup in order to initialize the .data secion */
  82. _sdata = . ;
  83. *(.data)
  84. *(.data.*)
  85. *(.gnu.linkonce.d*)
  86. PROVIDE(__dtors_start__ = .);
  87. KEEP(*(SORT(.dtors.*)))
  88. KEEP(*(.dtors))
  89. PROVIDE(__dtors_end__ = .);
  90. . = ALIGN(4);
  91. /* This is used by the startup in order to initialize the .data secion */
  92. _edata = . ;
  93. } >RAM
  94. .stack :
  95. {
  96. . = ALIGN(4);
  97. _sstack = .;
  98. . = . + _system_stack_size;
  99. . = ALIGN(4);
  100. _estack = .;
  101. } >RAM
  102. __bss_start = .;
  103. .bss :
  104. {
  105. . = ALIGN(4);
  106. /* This is used by the startup in order to initialize the .bss secion */
  107. _sbss = .;
  108. *(.bss)
  109. *(.bss.*)
  110. *(COMMON)
  111. . = ALIGN(4);
  112. /* This is used by the startup in order to initialize the .bss secion */
  113. _ebss = . ;
  114. *(.bss.init)
  115. } > RAM
  116. __bss_end = .;
  117. .RxDecripSection (NOLOAD) : ALIGN(4)
  118. {
  119. . = ALIGN(4);
  120. *(.RxDecripSection)
  121. *(.RxDecripSection.*)
  122. . = ALIGN(4);
  123. __RxDecripSection_free__ = .;
  124. } > RxDecripSection
  125. .TxDecripSection (NOLOAD) : ALIGN(4)
  126. {
  127. . = ALIGN(4);
  128. *(.TxDecripSection)
  129. *(.TxDecripSection.*)
  130. . = ALIGN(4);
  131. __TxDecripSection_free__ = .;
  132. } > TxDecripSection
  133. .RxArraySection (NOLOAD) : ALIGN(4)
  134. {
  135. . = ALIGN(4);
  136. *(.RxArraySection)
  137. *(.RxArraySection.*)
  138. . = ALIGN(4);
  139. __RxArraySection_free__ = .;
  140. } > RxArraySection
  141. _end = .;
  142. /* Stabs debugging sections. */
  143. .stab 0 : { *(.stab) }
  144. .stabstr 0 : { *(.stabstr) }
  145. .stab.excl 0 : { *(.stab.excl) }
  146. .stab.exclstr 0 : { *(.stab.exclstr) }
  147. .stab.index 0 : { *(.stab.index) }
  148. .stab.indexstr 0 : { *(.stab.indexstr) }
  149. .comment 0 : { *(.comment) }
  150. /* DWARF debug sections.
  151. * Symbols in the DWARF debugging sections are relative to the beginning
  152. * of the section so we begin them at 0. */
  153. /* DWARF 1 */
  154. .debug 0 : { *(.debug) }
  155. .line 0 : { *(.line) }
  156. /* GNU DWARF 1 extensions */
  157. .debug_srcinfo 0 : { *(.debug_srcinfo) }
  158. .debug_sfnames 0 : { *(.debug_sfnames) }
  159. /* DWARF 1.1 and DWARF 2 */
  160. .debug_aranges 0 : { *(.debug_aranges) }
  161. .debug_pubnames 0 : { *(.debug_pubnames) }
  162. /* DWARF 2 */
  163. .debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) }
  164. .debug_abbrev 0 : { *(.debug_abbrev) }
  165. .debug_line 0 : { *(.debug_line) }
  166. .debug_frame 0 : { *(.debug_frame) }
  167. .debug_str 0 : { *(.debug_str) }
  168. .debug_loc 0 : { *(.debug_loc) }
  169. .debug_macinfo 0 : { *(.debug_macinfo) }
  170. /* SGI/MIPS DWARF 2 extensions */
  171. .debug_weaknames 0 : { *(.debug_weaknames) }
  172. .debug_funcnames 0 : { *(.debug_funcnames) }
  173. .debug_typenames 0 : { *(.debug_typenames) }
  174. .debug_varnames 0 : { *(.debug_varnames) }
  175. }