Nie możesz wybrać więcej, niż 25 tematów Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.

3 lat temu
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220
  1. OUTPUT_FORMAT("elf32-littlearm", "elf32-bigarm",
  2. "elf32-littlearm")
  3. OUTPUT_ARCH(arm)
  4. ENTRY(_start)
  5. /* Do we need any of these for elf?
  6. __DYNAMIC = 0; */
  7. SECTIONS
  8. {
  9. /* Read-only sections, merged into text segment: */
  10. . = 0x00020000;
  11. .interp : { *(.interp) }
  12. .hash : { *(.hash) }
  13. .dynsym : { *(.dynsym) }
  14. .dynstr : { *(.dynstr) }
  15. .gnu.version : { *(.gnu.version) }
  16. .gnu.version_d : { *(.gnu.version_d) }
  17. .gnu.version_r : { *(.gnu.version_r) }
  18. .rel.init : { *(.rel.init) }
  19. .rela.init : { *(.rela.init) }
  20. .rel.text :
  21. {
  22. *(.rel.text)
  23. *(.rel.text.*)
  24. *(.rel.gnu.linkonce.t*)
  25. }
  26. .rela.text :
  27. {
  28. *(.rela.text)
  29. *(.rela.text.*)
  30. *(.rela.gnu.linkonce.t*)
  31. }
  32. .rel.fini : { *(.rel.fini) }
  33. .rela.fini : { *(.rela.fini) }
  34. .rel.rodata :
  35. {
  36. *(.rel.rodata)
  37. *(.rel.rodata.*)
  38. *(.rel.gnu.linkonce.r*)
  39. }
  40. .rela.rodata :
  41. {
  42. *(.rela.rodata)
  43. *(.rela.rodata.*)
  44. *(.rela.gnu.linkonce.r*)
  45. }
  46. .rel.data :
  47. {
  48. *(.rel.data)
  49. *(.rel.data.*)
  50. *(.rel.gnu.linkonce.d*)
  51. }
  52. .rela.data :
  53. {
  54. *(.rela.data)
  55. *(.rela.data.*)
  56. *(.rela.gnu.linkonce.d*)
  57. }
  58. .rel.ctors : { *(.rel.ctors) }
  59. .rela.ctors : { *(.rela.ctors) }
  60. .rel.dtors : { *(.rel.dtors) }
  61. .rela.dtors : { *(.rela.dtors) }
  62. .rel.got : { *(.rel.got) }
  63. .rela.got : { *(.rela.got) }
  64. .rel.sdata :
  65. {
  66. *(.rel.sdata)
  67. *(.rel.sdata.*)
  68. *(.rel.gnu.linkonce.s*)
  69. }
  70. .rela.sdata :
  71. {
  72. *(.rela.sdata)
  73. *(.rela.sdata.*)
  74. *(.rela.gnu.linkonce.s*)
  75. }
  76. .rel.sbss : { *(.rel.sbss) }
  77. .rela.sbss : { *(.rela.sbss) }
  78. .rel.bss : { *(.rel.bss) }
  79. .rela.bss : { *(.rela.bss) }
  80. .rel.plt : { *(.rel.plt) }
  81. .rela.plt : { *(.rela.plt) }
  82. .plt : { *(.plt) }
  83. .text :
  84. {
  85. *(.text)
  86. *(.text.*)
  87. *(.stub)
  88. /* .gnu.warning sections are handled specially by elf32.em. */
  89. *(.gnu.warning)
  90. *(.gnu.linkonce.t*)
  91. *(.glue_7t) *(.glue_7)
  92. } =0
  93. .init :
  94. {
  95. KEEP (*(.init))
  96. } =0
  97. _etext = .;
  98. PROVIDE (etext = .);
  99. .fini :
  100. {
  101. KEEP (*(.fini))
  102. } =0
  103. .rodata : { *(.rodata) *(.rodata.*) *(.gnu.linkonce.r*) }
  104. .rodata1 : { *(.rodata1) }
  105. .eh_frame_hdr : { *(.eh_frame_hdr) }
  106. /* Adjust the address for the data segment. We want to adjust up to
  107. the same address within the page on the next page up. */
  108. . = ALIGN(256) + (. & (256 - 1));
  109. .data :
  110. {
  111. *(.data)
  112. *(.data.*)
  113. *(.gnu.linkonce.d*)
  114. SORT(CONSTRUCTORS)
  115. }
  116. .data1 : { *(.data1) }
  117. .eh_frame : { KEEP (*(.eh_frame)) }
  118. .gcc_except_table : { *(.gcc_except_table) }
  119. .ctors :
  120. {
  121. /* gcc uses crtbegin.o to find the start of
  122. the constructors, so we make sure it is
  123. first. Because this is a wildcard, it
  124. doesn't matter if the user does not
  125. actually link against crtbegin.o; the
  126. linker won't look for a file to match a
  127. wildcard. The wildcard also means that it
  128. doesn't matter which directory crtbegin.o
  129. is in. */
  130. KEEP (*crtbegin.o(.ctors))
  131. /* We don't want to include the .ctor section from
  132. from the crtend.o file until after the sorted ctors.
  133. The .ctor section from the crtend file contains the
  134. end of ctors marker and it must be last */
  135. KEEP (*(EXCLUDE_FILE (*crtend.o ) .ctors))
  136. KEEP (*(SORT(.ctors.*)))
  137. KEEP (*(.ctors))
  138. }
  139. .dtors :
  140. {
  141. KEEP (*crtbegin.o(.dtors))
  142. KEEP (*(EXCLUDE_FILE (*crtend.o ) .dtors))
  143. KEEP (*(SORT(.dtors.*)))
  144. KEEP (*(.dtors))
  145. }
  146. .jcr : { KEEP (*(.jcr)) }
  147. .got : { *(.got.plt) *(.got) }
  148. .dynamic : { *(.dynamic) }
  149. /* We want the small data sections together, so single-instruction offsets
  150. can access them all, and initialized data all before uninitialized, so
  151. we can shorten the on-disk segment size. */
  152. .sdata :
  153. {
  154. *(.sdata)
  155. *(.sdata.*)
  156. *(.gnu.linkonce.s.*)
  157. }
  158. _edata = .;
  159. PROVIDE (edata = .);
  160. __bss_start = .;
  161. __bss_start__ = .;
  162. .sbss :
  163. {
  164. *(.dynsbss)
  165. *(.sbss)
  166. *(.sbss.*)
  167. *(.scommon)
  168. }
  169. .bss :
  170. {
  171. *(.dynbss)
  172. *(.bss)
  173. *(.bss.*)
  174. *(COMMON)
  175. /* Align here to ensure that the .bss section occupies space up to
  176. _end. Align after .bss to ensure correct alignment even if the
  177. .bss section disappears because there are no input sections. */
  178. . = ALIGN(32 / 8);
  179. }
  180. . = ALIGN(32 / 8);
  181. _end = .;
  182. _bss_end__ = . ; __bss_end__ = . ; __end__ = . ;
  183. PROVIDE (end = .);
  184. /* Stabs debugging sections. */
  185. .stab 0 : { *(.stab) }
  186. .stabstr 0 : { *(.stabstr) }
  187. .stab.excl 0 : { *(.stab.excl) }
  188. .stab.exclstr 0 : { *(.stab.exclstr) }
  189. .stab.index 0 : { *(.stab.index) }
  190. .stab.indexstr 0 : { *(.stab.indexstr) }
  191. .comment 0 : { *(.comment) }
  192. /* DWARF debug sections.
  193. Symbols in the DWARF debugging sections are relative to the beginning
  194. of the section so we begin them at 0. */
  195. /* DWARF 1 */
  196. .debug 0 : { *(.debug) }
  197. .line 0 : { *(.line) }
  198. /* GNU DWARF 1 extensions */
  199. .debug_srcinfo 0 : { *(.debug_srcinfo) }
  200. .debug_sfnames 0 : { *(.debug_sfnames) }
  201. /* DWARF 1.1 and DWARF 2 */
  202. .debug_aranges 0 : { *(.debug_aranges) }
  203. .debug_pubnames 0 : { *(.debug_pubnames) }
  204. /* DWARF 2 */
  205. .debug_info 0 : { *(.debug_info) }
  206. .debug_abbrev 0 : { *(.debug_abbrev) }
  207. .debug_line 0 : { *(.debug_line) }
  208. .debug_frame 0 : { *(.debug_frame) }
  209. .debug_str 0 : { *(.debug_str) }
  210. .debug_loc 0 : { *(.debug_loc) }
  211. .debug_macinfo 0 : { *(.debug_macinfo) }
  212. .debug_ranges 0 : { *(.debug_ranges) }
  213. /* SGI/MIPS DWARF 2 extensions */
  214. .debug_weaknames 0 : { *(.debug_weaknames) }
  215. .debug_funcnames 0 : { *(.debug_funcnames) }
  216. .debug_typenames 0 : { *(.debug_typenames) }
  217. .debug_varnames 0 : { *(.debug_varnames) }
  218. .stack 0x80000 : { _stack = .; *(.stack) }
  219. /* These must appear regardless of . */
  220. }