ls1c_ram.lds 3.4 KB

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