link.lds 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148
  1. OUTPUT_FORMAT("elf32-littlearm", "elf32-littlearm", "elf32-littlearm")
  2. OUTPUT_ARCH(arm)
  3. SECTIONS
  4. {
  5. . = 0x80000000;
  6. . = ALIGN(4);
  7. __text_start = .;
  8. .text :
  9. {
  10. *(.vectors)
  11. *(.text)
  12. *(.text.*)
  13. KEEP(*(.fini))
  14. /* section information for finsh shell */
  15. . = ALIGN(4);
  16. __fsymtab_start = .;
  17. KEEP(*(FSymTab))
  18. __fsymtab_end = .;
  19. . = ALIGN(4);
  20. __vsymtab_start = .;
  21. KEEP(*(VSymTab))
  22. __vsymtab_end = .;
  23. . = ALIGN(4);
  24. /* section information for modules */
  25. . = ALIGN(4);
  26. __rtmsymtab_start = .;
  27. KEEP(*(RTMSymTab))
  28. __rtmsymtab_end = .;
  29. /* section information for initialization */
  30. . = ALIGN(4);
  31. __rt_init_start = .;
  32. KEEP(*(SORT(.rti_fn*)))
  33. __rt_init_end = .;
  34. } =0
  35. __text_end = .;
  36. __rodata_start = .;
  37. .rodata : { *(.rodata) *(.rodata.*) *(.eh_frame) }
  38. __rodata_end = .;
  39. . = ALIGN(4);
  40. .ctors :
  41. {
  42. PROVIDE(__ctors_start__ = .);
  43. *crtbegin.o(.ctors)
  44. *crtbegin?.o(.ctors)
  45. *(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors)
  46. *(SORT(.ctors.*))
  47. *(.ctors)
  48. PROVIDE(__ctors_end__ = .);
  49. }
  50. .ARM.extab :
  51. {
  52. *(.ARM.extab* .gnu.linkonce.armextab.*)
  53. }
  54. /* The .ARM.exidx section is used for C++ exception handling. */
  55. /* .ARM.exidx is sorted, so has to go in its own output section. */
  56. __exidx_start = .;
  57. ARM.exidx :
  58. {
  59. *(.ARM.exidx* .gnu.linkonce.armexidx.*)
  60. /* This is used by the startup in order to initialize the .data secion */
  61. _sidata = .;
  62. }
  63. __exidx_end = .;
  64. .dtors :
  65. {
  66. PROVIDE(__dtors_start__ = .);
  67. *crtbegin.o(.dtors)
  68. *crtbegin?.o(.dtors)
  69. *(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors)
  70. *(SORT(.dtors.*))
  71. *(.dtors)
  72. PROVIDE(__dtors_end__ = .);
  73. }
  74. . = ALIGN(8);
  75. __data_start = .;
  76. .data :
  77. {
  78. *(.data)
  79. *(.data.*)
  80. . = ALIGN(4);
  81. /* preinit data */
  82. PROVIDE_HIDDEN (__preinit_array_start = .);
  83. KEEP(*(.preinit_array))
  84. PROVIDE_HIDDEN (__preinit_array_end = .);
  85. . = ALIGN(4);
  86. /* init data */
  87. PROVIDE_HIDDEN (__init_array_start = .);
  88. KEEP(*(SORT(.init_array.*)))
  89. KEEP(*(.init_array))
  90. PROVIDE_HIDDEN (__init_array_end = .);
  91. . = ALIGN(4);
  92. /* finit data */
  93. PROVIDE_HIDDEN (__fini_array_start = .);
  94. KEEP(*(SORT(.fini_array.*)))
  95. KEEP(*(.fini_array))
  96. PROVIDE_HIDDEN (__fini_array_end = .);
  97. KEEP(*(.jcr*))
  98. . = ALIGN(4);
  99. /* All data end */
  100. *(.gnu.linkonce.d*)
  101. }
  102. __data_end = .;
  103. . = ALIGN(8);
  104. __bss_start = .;
  105. .bss :
  106. {
  107. *(.bss)
  108. *(.bss.*)
  109. *(COMMON)
  110. . = ALIGN(4);
  111. }
  112. . = ALIGN(4);
  113. __bss_end = .;
  114. /* Stabs debugging sections. */
  115. .stab 0 : { *(.stab) }
  116. .stabstr 0 : { *(.stabstr) }
  117. .stab.excl 0 : { *(.stab.excl) }
  118. .stab.exclstr 0 : { *(.stab.exclstr) }
  119. .stab.index 0 : { *(.stab.index) }
  120. .stab.indexstr 0 : { *(.stab.indexstr) }
  121. .comment 0 : { *(.comment) }
  122. .debug_abbrev 0 : { *(.debug_abbrev) }
  123. .debug_info 0 : { *(.debug_info) }
  124. .debug_line 0 : { *(.debug_line) }
  125. .debug_pubnames 0 : { *(.debug_pubnames) }
  126. .debug_aranges 0 : { *(.debug_aranges) }
  127. _end = .;
  128. }