link.lds 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150
  1. /*
  2. * Copyright (c) 2006-2023, RT-Thread Development Team
  3. *
  4. * SPDX-License-Identifier: Apache-2.0
  5. *
  6. * Change Logs:
  7. * 2017-5-30 bernard first version
  8. */
  9. /* _EL1_STACK_SIZE = DEFINED(_EL1_STACK_SIZE) ? _EL1_STACK_SIZE : 0x20000; */
  10. SECTIONS
  11. {
  12. . = 0x80100000;
  13. . = ALIGN(4096);
  14. .text :
  15. {
  16. KEEP(*(.text.entrypoint)) /* The entry point */
  17. *(.vectors)
  18. *(.text) /* remaining code */
  19. *(.text.*) /* remaining code */
  20. *(.rodata) /* read-only data (constants) */
  21. *(.rodata*)
  22. *(.glue_7)
  23. *(.glue_7t)
  24. *(.gnu.linkonce.t*)
  25. *(COMMON)
  26. /* section information for finsh shell */
  27. . = ALIGN(16);
  28. __fsymtab_start = .;
  29. KEEP(*(FSymTab))
  30. __fsymtab_end = .;
  31. . = ALIGN(16);
  32. __vsymtab_start = .;
  33. KEEP(*(VSymTab))
  34. __vsymtab_end = .;
  35. . = ALIGN(16);
  36. /* section information for initial. */
  37. . = ALIGN(16);
  38. __rt_init_start = .;
  39. KEEP(*(SORT(.rti_fn*)))
  40. __rt_init_end = .;
  41. . = ALIGN(16);
  42. . = ALIGN(16);
  43. _etext = .;
  44. }
  45. . = ALIGN(4);
  46. .eh_frame_hdr :
  47. {
  48. *(.eh_frame_hdr)
  49. *(.eh_frame_entry)
  50. }
  51. .eh_frame : ONLY_IF_RO { KEEP (*(.eh_frame)) }
  52. . = ALIGN(16);
  53. .data :
  54. {
  55. *(.data)
  56. *(.data.*)
  57. *(.data1)
  58. *(.data1.*)
  59. . = ALIGN(16);
  60. _gp = ABSOLUTE(.); /* Base of small data */
  61. *(.sdata)
  62. *(.sdata.*)
  63. }
  64. . = ALIGN(16);
  65. .ctors :
  66. {
  67. PROVIDE(__ctors_start__ = .);
  68. /* new GCC version uses .init_array */
  69. KEEP(*(SORT(.init_array.*)))
  70. KEEP(*(.init_array))
  71. PROVIDE(__ctors_end__ = .);
  72. }
  73. . = ALIGN(4);
  74. .dtors :
  75. {
  76. PROVIDE(__dtors_start__ = .);
  77. KEEP(*(SORT(.dtors.*)))
  78. KEEP(*(.dtors))
  79. PROVIDE(__dtors_end__ = .);
  80. }
  81. . = ALIGN(16);
  82. .bss :
  83. {
  84. PROVIDE(__bss_start = .);
  85. *(.bss)
  86. *(.bss.*)
  87. *(.dynbss)
  88. . = ALIGN(32);
  89. PROVIDE(__bss_end = .);
  90. }
  91. . = ALIGN(4);
  92. .heap :
  93. {
  94. PROVIDE(__heap_start = .);
  95. . = ALIGN(8);
  96. PROVIDE(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. }
  133. __bss_size = SIZEOF(.bss);