link.lds 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140
  1. /*
  2. * Copyright (c) 2006-2021, 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. . = 0x80000;
  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. .eh_frame_hdr :
  46. {
  47. *(.eh_frame_hdr)
  48. *(.eh_frame_entry)
  49. }
  50. .eh_frame : ONLY_IF_RO { KEEP (*(.eh_frame)) }
  51. . = ALIGN(16);
  52. .data :
  53. {
  54. *(.data)
  55. *(.data.*)
  56. *(.data1)
  57. *(.data1.*)
  58. . = ALIGN(16);
  59. _gp = ABSOLUTE(.); /* Base of small data */
  60. *(.sdata)
  61. *(.sdata.*)
  62. }
  63. . = ALIGN(16);
  64. .ctors :
  65. {
  66. PROVIDE(__ctors_start__ = .);
  67. KEEP(*(SORT(.ctors.*)))
  68. KEEP(*(.ctors))
  69. PROVIDE(__ctors_end__ = .);
  70. }
  71. .dtors :
  72. {
  73. PROVIDE(__dtors_start__ = .);
  74. KEEP(*(SORT(.dtors.*)))
  75. KEEP(*(.dtors))
  76. PROVIDE(__dtors_end__ = .);
  77. }
  78. . = ALIGN(16);
  79. .bss :
  80. {
  81. PROVIDE(__bss_start = .);
  82. *(.bss)
  83. *(.bss.*)
  84. *(.dynbss)
  85. PROVIDE(__bss_end = .);
  86. }
  87. _end = .;
  88. /* Stabs debugging sections. */
  89. .stab 0 : { *(.stab) }
  90. .stabstr 0 : { *(.stabstr) }
  91. .stab.excl 0 : { *(.stab.excl) }
  92. .stab.exclstr 0 : { *(.stab.exclstr) }
  93. .stab.index 0 : { *(.stab.index) }
  94. .stab.indexstr 0 : { *(.stab.indexstr) }
  95. .comment 0 : { *(.comment) }
  96. /* DWARF debug sections.
  97. * Symbols in the DWARF debugging sections are relative to the beginning
  98. * of the section so we begin them at 0. */
  99. /* DWARF 1 */
  100. .debug 0 : { *(.debug) }
  101. .line 0 : { *(.line) }
  102. /* GNU DWARF 1 extensions */
  103. .debug_srcinfo 0 : { *(.debug_srcinfo) }
  104. .debug_sfnames 0 : { *(.debug_sfnames) }
  105. /* DWARF 1.1 and DWARF 2 */
  106. .debug_aranges 0 : { *(.debug_aranges) }
  107. .debug_pubnames 0 : { *(.debug_pubnames) }
  108. /* DWARF 2 */
  109. .debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) }
  110. .debug_abbrev 0 : { *(.debug_abbrev) }
  111. .debug_line 0 : { *(.debug_line) }
  112. .debug_frame 0 : { *(.debug_frame) }
  113. .debug_str 0 : { *(.debug_str) }
  114. .debug_loc 0 : { *(.debug_loc) }
  115. .debug_macinfo 0 : { *(.debug_macinfo) }
  116. /* SGI/MIPS DWARF 2 extensions */
  117. .debug_weaknames 0 : { *(.debug_weaknames) }
  118. .debug_funcnames 0 : { *(.debug_funcnames) }
  119. .debug_typenames 0 : { *(.debug_typenames) }
  120. .debug_varnames 0 : { *(.debug_varnames) }
  121. }
  122. __bss_size = (__bss_end - __bss_start)>>3;