ls1b_ram.lds 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145
  1. /*
  2. * File : ls1b_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. * 2019-12-04 Jiaxun Yang Adapt new memory layout
  15. */
  16. OUTPUT_ARCH(mips)
  17. GROUP(-lgcc -lc)
  18. ENTRY(_start)
  19. SECTIONS
  20. {
  21. . = 0x80200000;
  22. .text :
  23. {
  24. start = ABSOLUTE(.);
  25. *(.selfboot);
  26. *(.selfboot_data);
  27. . = ALIGN(4);
  28. __selfboot_end = .;
  29. . = ALIGN(0x1000);
  30. __ebase_entry = .;
  31. KEEP(*(.exc_vectors))
  32. __ebase_end = .;
  33. *(.start);
  34. *(.text)
  35. *(.text.*)
  36. *(.rodata)
  37. *(.rodata.*)
  38. *(.rodata1)
  39. *(.rodata1.*)
  40. /* section information for finsh shell */
  41. . = ALIGN(4);
  42. __fsymtab_start = .;
  43. KEEP(*(FSymTab))
  44. __fsymtab_end = .;
  45. . = ALIGN(4);
  46. __vsymtab_start = .;
  47. KEEP(*(VSymTab))
  48. __vsymtab_end = .;
  49. . = ALIGN(4);
  50. . = ALIGN(4);
  51. __rt_init_start = .;
  52. KEEP(*(SORT(.rti_fn*)))
  53. __rt_init_end = .;
  54. . = ALIGN(4);
  55. }
  56. .eh_frame_hdr :
  57. {
  58. *(.eh_frame_hdr)
  59. *(.eh_frame_entry)
  60. }
  61. .eh_frame : ONLY_IF_RO { KEEP (*(.eh_frame)) }
  62. . = ALIGN(4);
  63. .data :
  64. {
  65. *(.data)
  66. *(.data.*)
  67. *(.data1)
  68. *(.data1.*)
  69. . = ALIGN(8);
  70. _gp = ABSOLUTE(.); /* Base of small data */
  71. *(.sdata)
  72. *(.sdata.*)
  73. }
  74. _edata = .;
  75. .stack :
  76. {
  77. . = ALIGN(8);
  78. _system_stack_start = .;
  79. . = . + 0x400; /* 1kb system stack */
  80. _system_stack = .;
  81. }
  82. .sbss :
  83. {
  84. __bss_start = .;
  85. *(.sbss)
  86. *(.sbss.*)
  87. *(.dynsbss)
  88. *(.scommon)
  89. }
  90. .bss :
  91. {
  92. *(.bss)
  93. *(.bss.*)
  94. *(.dynbss)
  95. *(COMMON)
  96. __bss_end = .;
  97. }
  98. _end = .;
  99. /* Stabs debugging sections. */
  100. .stab 0 : { *(.stab) }
  101. .stabstr 0 : { *(.stabstr) }
  102. .stab.excl 0 : { *(.stab.excl) }
  103. .stab.exclstr 0 : { *(.stab.exclstr) }
  104. .stab.index 0 : { *(.stab.index) }
  105. .stab.indexstr 0 : { *(.stab.indexstr) }
  106. .comment 0 : { *(.comment) }
  107. /* DWARF debug sections.
  108. * Symbols in the DWARF debugging sections are relative to the beginning
  109. * of the section so we begin them at 0. */
  110. /* DWARF 1 */
  111. .debug 0 : { *(.debug) }
  112. .line 0 : { *(.line) }
  113. /* GNU DWARF 1 extensions */
  114. .debug_srcinfo 0 : { *(.debug_srcinfo) }
  115. .debug_sfnames 0 : { *(.debug_sfnames) }
  116. /* DWARF 1.1 and DWARF 2 */
  117. .debug_aranges 0 : { *(.debug_aranges) }
  118. .debug_pubnames 0 : { *(.debug_pubnames) }
  119. /* DWARF 2 */
  120. .debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) }
  121. .debug_abbrev 0 : { *(.debug_abbrev) }
  122. .debug_line 0 : { *(.debug_line) }
  123. .debug_frame 0 : { *(.debug_frame) }
  124. .debug_str 0 : { *(.debug_str) }
  125. .debug_loc 0 : { *(.debug_loc) }
  126. .debug_macinfo 0 : { *(.debug_macinfo) }
  127. /* SGI/MIPS DWARF 2 extensions */
  128. .debug_weaknames 0 : { *(.debug_weaknames) }
  129. .debug_funcnames 0 : { *(.debug_funcnames) }
  130. .debug_typenames 0 : { *(.debug_typenames) }
  131. .debug_varnames 0 : { *(.debug_varnames) }
  132. }