ls1b_ram.lds 3.3 KB

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