link.lds 3.5 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. * 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. /* new GCC version uses .init_array */
  68. KEEP(*(SORT(.init_array.*)))
  69. KEEP(*(.init_array))
  70. PROVIDE(__ctors_end__ = .);
  71. }
  72. .dtors :
  73. {
  74. PROVIDE(__dtors_start__ = .);
  75. KEEP(*(SORT(.dtors.*)))
  76. KEEP(*(.dtors))
  77. PROVIDE(__dtors_end__ = .);
  78. }
  79. . = ALIGN(16);
  80. .bss :
  81. {
  82. PROVIDE(__bss_start = .);
  83. *(.bss)
  84. *(.bss.*)
  85. *(.dynbss)
  86. PROVIDE(__bss_end = .);
  87. }
  88. _end = .;
  89. /* Stabs debugging sections. */
  90. .stab 0 : { *(.stab) }
  91. .stabstr 0 : { *(.stabstr) }
  92. .stab.excl 0 : { *(.stab.excl) }
  93. .stab.exclstr 0 : { *(.stab.exclstr) }
  94. .stab.index 0 : { *(.stab.index) }
  95. .stab.indexstr 0 : { *(.stab.indexstr) }
  96. .comment 0 : { *(.comment) }
  97. /* DWARF debug sections.
  98. * Symbols in the DWARF debugging sections are relative to the beginning
  99. * of the section so we begin them at 0. */
  100. /* DWARF 1 */
  101. .debug 0 : { *(.debug) }
  102. .line 0 : { *(.line) }
  103. /* GNU DWARF 1 extensions */
  104. .debug_srcinfo 0 : { *(.debug_srcinfo) }
  105. .debug_sfnames 0 : { *(.debug_sfnames) }
  106. /* DWARF 1.1 and DWARF 2 */
  107. .debug_aranges 0 : { *(.debug_aranges) }
  108. .debug_pubnames 0 : { *(.debug_pubnames) }
  109. /* DWARF 2 */
  110. .debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) }
  111. .debug_abbrev 0 : { *(.debug_abbrev) }
  112. .debug_line 0 : { *(.debug_line) }
  113. .debug_frame 0 : { *(.debug_frame) }
  114. .debug_str 0 : { *(.debug_str) }
  115. .debug_loc 0 : { *(.debug_loc) }
  116. .debug_macinfo 0 : { *(.debug_macinfo) }
  117. /* SGI/MIPS DWARF 2 extensions */
  118. .debug_weaknames 0 : { *(.debug_weaknames) }
  119. .debug_funcnames 0 : { *(.debug_funcnames) }
  120. .debug_typenames 0 : { *(.debug_typenames) }
  121. .debug_varnames 0 : { *(.debug_varnames) }
  122. }
  123. __bss_size = SIZEOF(.bss);