link_smart.lds 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149
  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. /* . = 0x80080000 ; */
  13. . = 0xffff000000080000 ;
  14. . = ALIGN(4096);
  15. .text :
  16. {
  17. KEEP(*(.text.entrypoint)) /* The entry point */
  18. *(.vectors)
  19. *(.text) /* remaining code */
  20. *(.text.*) /* remaining code */
  21. *(.rodata) /* read-only data (constants) */
  22. *(.rodata*)
  23. *(.glue_7)
  24. *(.glue_7t)
  25. *(.gnu.linkonce.t*)
  26. *(COMMON)
  27. /* section information for utest */
  28. . = ALIGN(8);
  29. __rt_utest_tc_tab_start = .;
  30. KEEP(*(UtestTcTab))
  31. __rt_utest_tc_tab_end = .;
  32. /* section information for finsh shell */
  33. . = ALIGN(16);
  34. __fsymtab_start = .;
  35. KEEP(*(FSymTab))
  36. __fsymtab_end = .;
  37. . = ALIGN(16);
  38. __vsymtab_start = .;
  39. KEEP(*(VSymTab))
  40. __vsymtab_end = .;
  41. . = ALIGN(16);
  42. /* section information for initial. */
  43. . = ALIGN(16);
  44. __rt_init_start = .;
  45. KEEP(*(SORT(.rti_fn*)))
  46. __rt_init_end = .;
  47. . = ALIGN(16);
  48. . = ALIGN(16);
  49. _etext = .;
  50. }
  51. . = ALIGN(4);
  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(16);
  59. .data :
  60. {
  61. *(.data)
  62. *(.data.*)
  63. *(.data1)
  64. *(.data1.*)
  65. . = ALIGN(16);
  66. _gp = ABSOLUTE(.); /* Base of small data */
  67. *(.sdata)
  68. *(.sdata.*)
  69. }
  70. . = ALIGN(16);
  71. .ctors :
  72. {
  73. PROVIDE(__ctors_start__ = .);
  74. /* new GCC version uses .init_array */
  75. KEEP(*(SORT(.init_array.*)))
  76. KEEP(*(.init_array))
  77. PROVIDE(__ctors_end__ = .);
  78. }
  79. . = ALIGN(4);
  80. .dtors :
  81. {
  82. PROVIDE(__dtors_start__ = .);
  83. KEEP(*(SORT(.dtors.*)))
  84. KEEP(*(.dtors))
  85. PROVIDE(__dtors_end__ = .);
  86. }
  87. . = ALIGN(16);
  88. .bss :
  89. {
  90. PROVIDE(__bss_start = .);
  91. *(.bss)
  92. *(.bss.*)
  93. *(.dynbss)
  94. . = ALIGN(32);
  95. PROVIDE(__bss_end = .);
  96. }
  97. _end = .;
  98. /* Stabs debugging sections. */
  99. .stab 0 : { *(.stab) }
  100. .stabstr 0 : { *(.stabstr) }
  101. .stab.excl 0 : { *(.stab.excl) }
  102. .stab.exclstr 0 : { *(.stab.exclstr) }
  103. .stab.index 0 : { *(.stab.index) }
  104. .stab.indexstr 0 : { *(.stab.indexstr) }
  105. .comment 0 : { *(.comment) }
  106. /* DWARF debug sections.
  107. * Symbols in the DWARF debugging sections are relative to the beginning
  108. * of the section so we begin them at 0. */
  109. /* DWARF 1 */
  110. .debug 0 : { *(.debug) }
  111. .line 0 : { *(.line) }
  112. /* GNU DWARF 1 extensions */
  113. .debug_srcinfo 0 : { *(.debug_srcinfo) }
  114. .debug_sfnames 0 : { *(.debug_sfnames) }
  115. /* DWARF 1.1 and DWARF 2 */
  116. .debug_aranges 0 : { *(.debug_aranges) }
  117. .debug_pubnames 0 : { *(.debug_pubnames) }
  118. /* DWARF 2 */
  119. .debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) }
  120. .debug_abbrev 0 : { *(.debug_abbrev) }
  121. .debug_line 0 : { *(.debug_line) }
  122. .debug_frame 0 : { *(.debug_frame) }
  123. .debug_str 0 : { *(.debug_str) }
  124. .debug_loc 0 : { *(.debug_loc) }
  125. .debug_macinfo 0 : { *(.debug_macinfo) }
  126. /* SGI/MIPS DWARF 2 extensions */
  127. .debug_weaknames 0 : { *(.debug_weaknames) }
  128. .debug_funcnames 0 : { *(.debug_funcnames) }
  129. .debug_typenames 0 : { *(.debug_typenames) }
  130. .debug_varnames 0 : { *(.debug_varnames) }
  131. }
  132. __bss_size = SIZEOF(.bss);