ls2k_ram.lds 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158
  1. /*
  2. * Copyright (c) 2006-2020, RT-Thread Development Team
  3. *
  4. * SPDX-License-Identifier: Apache-2.0
  5. *
  6. * Change Logs:
  7. * Date Author Notes
  8. * 2020-04-05 bigmagic Initial version
  9. */
  10. OUTPUT_ARCH(mips)
  11. GROUP(-lgcc -lc)
  12. ENTRY(_start)
  13. SECTIONS
  14. {
  15. . = 0xffffffff82000000 ;
  16. .text :
  17. {
  18. __ebase_entry = .;
  19. KEEP(*(.exc_vectors))
  20. __ebase_end = .;
  21. start = .;
  22. *(.start);
  23. . = ALIGN(4);
  24. *(.text)
  25. *(.text.*)
  26. *(.rodata)
  27. *(.rodata.*)
  28. *(.rodata1)
  29. *(.rodata1.*)
  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. . = ALIGN(4);
  40. . = ALIGN(4);
  41. __rt_init_start = .;
  42. KEEP(*(SORT(.rti_fn*)))
  43. __rt_init_end = .;
  44. . = ALIGN(4);
  45. . = ALIGN(4);
  46. __rt_utest_tc_tab_start = .;
  47. KEEP(*(UtestTcTab))
  48. __rt_utest_tc_tab_end = .;
  49. . = ALIGN(4);
  50. }
  51. .eh_frame_hdr :
  52. {
  53. *(.eh_frame_hdr)
  54. *(.eh_frame_entry)
  55. }
  56. .eh_frame : ONLY_IF_RO { KEEP (*(.eh_frame)) }
  57. . = ALIGN(4);
  58. .data :
  59. {
  60. *(.data)
  61. *(.data.*)
  62. *(.data1)
  63. *(.data1.*)
  64. . = ALIGN(8);
  65. _gp = ABSOLUTE(.); /* Base of small data */
  66. *(.sdata)
  67. *(.sdata.*)
  68. }
  69. . = ALIGN(4);
  70. .ctors :
  71. {
  72. PROVIDE(__ctors_start__ = .);
  73. KEEP(*(SORT(.ctors.*)))
  74. KEEP(*(.ctors))
  75. PROVIDE(__ctors_end__ = .);
  76. }
  77. .dtors :
  78. {
  79. PROVIDE(__dtors_start__ = .);
  80. KEEP(*(SORT(.dtors.*)))
  81. KEEP(*(.dtors))
  82. PROVIDE(__dtors_end__ = .);
  83. }
  84. .stack :
  85. {
  86. . = ALIGN(8);
  87. _system_stack_start = .;
  88. . = . + 0x1000;
  89. _system_stack = .;
  90. }
  91. .sbss :
  92. {
  93. __bss_start = .;
  94. *(.sbss)
  95. *(.sbss.*)
  96. *(.dynsbss)
  97. *(.scommon)
  98. }
  99. .bss :
  100. {
  101. *(.bss)
  102. *(.bss.*)
  103. *(.dynbss)
  104. *(COMMON)
  105. __bss_end = .;
  106. }
  107. _end = .;
  108. /* Stabs debugging sections. */
  109. .stab 0 : { *(.stab) }
  110. .stabstr 0 : { *(.stabstr) }
  111. .stab.excl 0 : { *(.stab.excl) }
  112. .stab.exclstr 0 : { *(.stab.exclstr) }
  113. .stab.index 0 : { *(.stab.index) }
  114. .stab.indexstr 0 : { *(.stab.indexstr) }
  115. .comment 0 : { *(.comment) }
  116. /* DWARF debug sections.
  117. * Symbols in the DWARF debugging sections are relative to the beginning
  118. * of the section so we begin them at 0. */
  119. /* DWARF 1 */
  120. .debug 0 : { *(.debug) }
  121. .line 0 : { *(.line) }
  122. /* GNU DWARF 1 extensions */
  123. .debug_srcinfo 0 : { *(.debug_srcinfo) }
  124. .debug_sfnames 0 : { *(.debug_sfnames) }
  125. /* DWARF 1.1 and DWARF 2 */
  126. .debug_aranges 0 : { *(.debug_aranges) }
  127. .debug_pubnames 0 : { *(.debug_pubnames) }
  128. /* DWARF 2 */
  129. .debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) }
  130. .debug_abbrev 0 : { *(.debug_abbrev) }
  131. .debug_line 0 : { *(.debug_line) }
  132. .debug_frame 0 : { *(.debug_frame) }
  133. .debug_str 0 : { *(.debug_str) }
  134. .debug_loc 0 : { *(.debug_loc) }
  135. .debug_macinfo 0 : { *(.debug_macinfo) }
  136. /* SGI/MIPS DWARF 2 extensions */
  137. .debug_weaknames 0 : { *(.debug_weaknames) }
  138. .debug_funcnames 0 : { *(.debug_funcnames) }
  139. .debug_typenames 0 : { *(.debug_typenames) }
  140. .debug_varnames 0 : { *(.debug_varnames) }
  141. }