ls1c_ram.lds 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146
  1. /*
  2. * File : ls1c_ram.lds
  3. * This file is part of RT-Thread RTOS
  4. * COPYRIGHT (C) 2011, RT-Thread Development Team
  5. *
  6. * The license and distribution terms for this file may be
  7. * found in the file LICENSE in this distribution or at
  8. * http://www.rt-thread.org/license/LICENSE
  9. *
  10. * Change Logs:
  11. * Date Author Notes
  12. * 2010-05-17 swkyer first version
  13. * 2010-09-04 bernard move the beginning entry to 0x80200000
  14. * 2018-05-12 zhuangwei use -Ttext
  15. * 2019-12-04 Jiaxun Yang Adapt new memory layout
  16. */
  17. OUTPUT_ARCH(mips)
  18. GROUP(-lgcc -lc)
  19. ENTRY(_start)
  20. SECTIONS
  21. {
  22. . = ALIGN(4);
  23. .text :
  24. {
  25. start = ABSOLUTE(.);
  26. *(.selfboot);
  27. *(.selfboot_data);
  28. . = ALIGN(4);
  29. __selfboot_end = .;
  30. . = ALIGN(0x1000);
  31. __ebase_entry = .;
  32. KEEP(*(.exc_vectors))
  33. __ebase_end = .;
  34. *(.start);
  35. *(.text)
  36. *(.text.*)
  37. *(.rodata)
  38. *(.rodata.*)
  39. *(.rodata1)
  40. *(.rodata1.*)
  41. /* section information for finsh shell */
  42. . = ALIGN(4);
  43. __fsymtab_start = .;
  44. KEEP(*(FSymTab))
  45. __fsymtab_end = .;
  46. . = ALIGN(4);
  47. __vsymtab_start = .;
  48. KEEP(*(VSymTab))
  49. __vsymtab_end = .;
  50. . = ALIGN(4);
  51. . = ALIGN(4);
  52. __rt_init_start = .;
  53. KEEP(*(SORT(.rti_fn*)))
  54. __rt_init_end = .;
  55. . = ALIGN(4);
  56. }
  57. .eh_frame_hdr :
  58. {
  59. *(.eh_frame_hdr)
  60. *(.eh_frame_entry)
  61. }
  62. .eh_frame : ONLY_IF_RO { KEEP (*(.eh_frame)) }
  63. . = ALIGN(4);
  64. .data :
  65. {
  66. *(.data)
  67. *(.data.*)
  68. *(.data1)
  69. *(.data1.*)
  70. . = ALIGN(8);
  71. _gp = ABSOLUTE(.); /* Base of small data */
  72. *(.sdata)
  73. *(.sdata.*)
  74. }
  75. _edata = .;
  76. .stack :
  77. {
  78. . = ALIGN(8);
  79. _system_stack_start = .;
  80. . = . + 0x400; /* 1kb system stack */
  81. _system_stack = .;
  82. }
  83. .sbss :
  84. {
  85. __bss_start = .;
  86. *(.sbss)
  87. *(.sbss.*)
  88. *(.dynsbss)
  89. *(.scommon)
  90. }
  91. .bss :
  92. {
  93. *(.bss)
  94. *(.bss.*)
  95. *(.dynbss)
  96. *(COMMON)
  97. __bss_end = .;
  98. }
  99. _end = .;
  100. /* Stabs debugging sections. */
  101. .stab 0 : { *(.stab) }
  102. .stabstr 0 : { *(.stabstr) }
  103. .stab.excl 0 : { *(.stab.excl) }
  104. .stab.exclstr 0 : { *(.stab.exclstr) }
  105. .stab.index 0 : { *(.stab.index) }
  106. .stab.indexstr 0 : { *(.stab.indexstr) }
  107. .comment 0 : { *(.comment) }
  108. /* DWARF debug sections.
  109. * Symbols in the DWARF debugging sections are relative to the beginning
  110. * of the section so we begin them at 0. */
  111. /* DWARF 1 */
  112. .debug 0 : { *(.debug) }
  113. .line 0 : { *(.line) }
  114. /* GNU DWARF 1 extensions */
  115. .debug_srcinfo 0 : { *(.debug_srcinfo) }
  116. .debug_sfnames 0 : { *(.debug_sfnames) }
  117. /* DWARF 1.1 and DWARF 2 */
  118. .debug_aranges 0 : { *(.debug_aranges) }
  119. .debug_pubnames 0 : { *(.debug_pubnames) }
  120. /* DWARF 2 */
  121. .debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) }
  122. .debug_abbrev 0 : { *(.debug_abbrev) }
  123. .debug_line 0 : { *(.debug_line) }
  124. .debug_frame 0 : { *(.debug_frame) }
  125. .debug_str 0 : { *(.debug_str) }
  126. .debug_loc 0 : { *(.debug_loc) }
  127. .debug_macinfo 0 : { *(.debug_macinfo) }
  128. /* SGI/MIPS DWARF 2 extensions */
  129. .debug_weaknames 0 : { *(.debug_weaknames) }
  130. .debug_funcnames 0 : { *(.debug_funcnames) }
  131. .debug_typenames 0 : { *(.debug_typenames) }
  132. .debug_varnames 0 : { *(.debug_varnames) }
  133. }