link_smart.lds 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151
  1. /*
  2. * Copyright (C) 2017-2024 Alibaba Group Holding Limited
  3. *
  4. * SPDX-License-Identifier: Apache-2.0
  5. *
  6. * Licensed under the Apache License, Version 2.0 (the "License");
  7. * you may not use this file except in compliance with the License.
  8. * You may obtain a copy of the License at
  9. *
  10. * http://www.apache.org/licenses/LICENSE-2.0
  11. *
  12. * Unless required by applicable law or agreed to in writing, software
  13. * distributed under the License is distributed on an "AS IS" BASIS,
  14. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  15. * See the License for the specific language governing permissions and
  16. * limitations under the License.
  17. */
  18. INCLUDE "link_stacksize.lds"
  19. MEMORY
  20. {
  21. DRAM : ORIGIN = 0xFFFFFFC000200000, LENGTH = 0x1000000 - 0x200000
  22. }
  23. ENTRY(_start)
  24. SECTIONS
  25. {
  26. /* . = 0x80200000 ; */
  27. . = 0xFFFFFFC000200000;
  28. /* __STACKSIZE__ = 4096; */
  29. __text_start = .;
  30. .start :
  31. {
  32. *(.start);
  33. } > DRAM
  34. . = ALIGN(8);
  35. .text :
  36. {
  37. *(.text)
  38. *(.text.*)
  39. *(.rodata)
  40. *(.rodata*)
  41. *(.glue_7)
  42. *(.glue_7t)
  43. *(.gnu.linkonce.t*)
  44. . = ALIGN(8);
  45. __fsymtab_start = .;
  46. KEEP(*(FSymTab))
  47. __fsymtab_end = .;
  48. . = ALIGN(8);
  49. __vsymtab_start = .;
  50. KEEP(*(VSymTab))
  51. __vsymtab_end = .;
  52. . = ALIGN(8);
  53. . = ALIGN(8);
  54. __rt_init_start = .;
  55. KEEP(*(SORT(.rti_fn*)))
  56. __rt_init_end = .;
  57. . = ALIGN(8);
  58. __rt_utest_tc_tab_start = .;
  59. KEEP(*(UtestTcTab))
  60. __rt_utest_tc_tab_end = .;
  61. . = ALIGN(8);
  62. __usbh_class_info_start__ = .;
  63. KEEP(*(.usbh_class_info))
  64. __usbh_class_info_end__ = .;
  65. . = ALIGN(8);
  66. _etext = .;
  67. } > DRAM
  68. .eh_frame_hdr :
  69. {
  70. *(.eh_frame_hdr)
  71. *(.eh_frame_entry)
  72. } > DRAM
  73. .eh_frame : ONLY_IF_RO { KEEP (*(.eh_frame)) } > DRAM
  74. . = ALIGN(8);
  75. __text_end = .;
  76. __text_size = __text_end - __text_start;
  77. .data :
  78. {
  79. *(.data)
  80. *(.data.*)
  81. *(.data1)
  82. *(.data1.*)
  83. . = ALIGN(8);
  84. PROVIDE( __global_pointer$ = . + 0x800 );
  85. *(.sdata)
  86. *(.sdata.*)
  87. } > DRAM
  88. .stack :
  89. {
  90. . = ALIGN(64);
  91. __stack_start__ = .;
  92. . += 65536;
  93. __stack_cpu0 = .;
  94. . += 65536;
  95. __stack_cpu1 = .;
  96. } > DRAM
  97. . = ALIGN(8);
  98. .osdebug :
  99. {
  100. _osdebug_start = .;
  101. . += 87K;
  102. _osdebug_end = .;
  103. } > DRAM
  104. . = ALIGN(8);
  105. .sbss :
  106. {
  107. __bss_start = .;
  108. *(.sbss)
  109. *(.sbss.*)
  110. *(.dynsbss)
  111. *(.scommon)
  112. } > DRAM
  113. .bss :
  114. {
  115. *(.bss)
  116. *(.bss.*)
  117. *(.dynbss)
  118. *(COMMON)
  119. . = ALIGN(64);
  120. __bss_end = .;
  121. } > DRAM
  122. _end = .;
  123. .stab 0 : { *(.stab) }
  124. .stabstr 0 : { *(.stabstr) }
  125. .stab.excl 0 : { *(.stab.excl) }
  126. .stab.exclstr 0 : { *(.stab.exclstr) }
  127. .stab.index 0 : { *(.stab.index) }
  128. .stab.indexstr 0 : { *(.stab.indexstr) }
  129. .comment 0 : { *(.comment) }
  130. .debug 0 : { *(.debug) }
  131. .line 0 : { *(.line) }
  132. .debug_srcinfo 0 : { *(.debug_srcinfo) }
  133. .debug_sfnames 0 : { *(.debug_sfnames) }
  134. .debug_aranges 0 : { *(.debug_aranges) }
  135. .debug_pubnames 0 : { *(.debug_pubnames) }
  136. .debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) }
  137. .debug_abbrev 0 : { *(.debug_abbrev) }
  138. .debug_line 0 : { *(.debug_line) }
  139. .debug_frame 0 : { *(.debug_frame) }
  140. .debug_str 0 : { *(.debug_str) }
  141. .debug_loc 0 : { *(.debug_loc) }
  142. .debug_macinfo 0 : { *(.debug_macinfo) }
  143. .debug_weaknames 0 : { *(.debug_weaknames) }
  144. .debug_funcnames 0 : { *(.debug_funcnames) }
  145. .debug_typenames 0 : { *(.debug_typenames) }
  146. .debug_varnames 0 : { *(.debug_varnames) }
  147. }