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.

267 lines
9.6KB

  1. /* Script for -z combreloc -z separate-code */
  2. /* Copyright (C) 2014-2020 Free Software Foundation, Inc.
  3. Copying and distribution of this script, with or without modification,
  4. are permitted in any medium without royalty provided the copyright
  5. notice and this notice are preserved. */
  6. OUTPUT_FORMAT("elf32-littlearm", "elf32-bigarm",
  7. "elf32-littlearm")
  8. OUTPUT_ARCH(arm)
  9. ENTRY(_start)
  10. SEARCH_DIR("=/tmp/jenkins-GCC-10-pipeline-48_20201124_1606180639/install-native/arm-none-eabi/lib"); SEARCH_DIR("=/usr/local/lib"); SEARCH_DIR("=/lib"); SEARCH_DIR("=/usr/lib");
  11. SECTIONS
  12. {
  13. PROVIDE (__executable_start = SEGMENT_START("text-segment", 0x8000)); . = SEGMENT_START("text-segment", 0x8000);
  14. .interp : { *(.interp) }
  15. .note.gnu.build-id : { *(.note.gnu.build-id) }
  16. .hash : { *(.hash) }
  17. .gnu.hash : { *(.gnu.hash) }
  18. .dynsym : { *(.dynsym) }
  19. .dynstr : { *(.dynstr) }
  20. .gnu.version : { *(.gnu.version) }
  21. .gnu.version_d : { *(.gnu.version_d) }
  22. .gnu.version_r : { *(.gnu.version_r) }
  23. .rel.dyn :
  24. {
  25. *(.rel.init)
  26. *(.rel.text .rel.text.* .rel.gnu.linkonce.t.*)
  27. *(.rel.fini)
  28. *(.rel.rodata .rel.rodata.* .rel.gnu.linkonce.r.*)
  29. *(.rel.data.rel.ro .rel.data.rel.ro.* .rel.gnu.linkonce.d.rel.ro.*)
  30. *(.rel.data .rel.data.* .rel.gnu.linkonce.d.*)
  31. *(.rel.tdata .rel.tdata.* .rel.gnu.linkonce.td.*)
  32. *(.rel.tbss .rel.tbss.* .rel.gnu.linkonce.tb.*)
  33. *(.rel.ctors)
  34. *(.rel.dtors)
  35. *(.rel.got)
  36. *(.rel.bss .rel.bss.* .rel.gnu.linkonce.b.*)
  37. PROVIDE_HIDDEN (__rel_iplt_start = .);
  38. *(.rel.iplt)
  39. PROVIDE_HIDDEN (__rel_iplt_end = .);
  40. }
  41. .rela.dyn :
  42. {
  43. *(.rela.init)
  44. *(.rela.text .rela.text.* .rela.gnu.linkonce.t.*)
  45. *(.rela.fini)
  46. *(.rela.rodata .rela.rodata.* .rela.gnu.linkonce.r.*)
  47. *(.rela.data .rela.data.* .rela.gnu.linkonce.d.*)
  48. *(.rela.tdata .rela.tdata.* .rela.gnu.linkonce.td.*)
  49. *(.rela.tbss .rela.tbss.* .rela.gnu.linkonce.tb.*)
  50. *(.rela.ctors)
  51. *(.rela.dtors)
  52. *(.rela.got)
  53. *(.rela.bss .rela.bss.* .rela.gnu.linkonce.b.*)
  54. PROVIDE_HIDDEN (__rela_iplt_start = .);
  55. *(.rela.iplt)
  56. PROVIDE_HIDDEN (__rela_iplt_end = .);
  57. }
  58. .rel.plt :
  59. {
  60. *(.rel.plt)
  61. }
  62. .rela.plt :
  63. {
  64. *(.rela.plt)
  65. }
  66. . = ALIGN(CONSTANT (MAXPAGESIZE));
  67. .init :
  68. {
  69. KEEP (*(SORT_NONE(.init)))
  70. }
  71. .plt : { *(.plt) }
  72. .iplt : { *(.iplt) }
  73. .text :
  74. {
  75. *(.text.unlikely .text.*_unlikely .text.unlikely.*)
  76. *(.text.exit .text.exit.*)
  77. *(.text.startup .text.startup.*)
  78. *(.text.hot .text.hot.*)
  79. *(SORT(.text.sorted.*))
  80. *(.text .stub .text.* .gnu.linkonce.t.*)
  81. /* .gnu.warning sections are handled specially by elf.em. */
  82. *(.gnu.warning)
  83. *(.glue_7t) *(.glue_7) *(.vfp11_veneer) *(.v4_bx)
  84. }
  85. .fini :
  86. {
  87. KEEP (*(SORT_NONE(.fini)))
  88. }
  89. PROVIDE (__etext = .);
  90. PROVIDE (_etext = .);
  91. PROVIDE (etext = .);
  92. . = ALIGN(CONSTANT (MAXPAGESIZE));
  93. /* Adjust the address for the rodata segment. We want to adjust up to
  94. the same address within the page on the next page up. */
  95. . = SEGMENT_START("rodata-segment", ALIGN(CONSTANT (MAXPAGESIZE)) + (. & (CONSTANT (MAXPAGESIZE) - 1)));
  96. .rodata : { *(.rodata .rodata.* .gnu.linkonce.r.*) }
  97. .rodata1 : { *(.rodata1) }
  98. .ARM.extab : { *(.ARM.extab* .gnu.linkonce.armextab.*) }
  99. .ARM.exidx :
  100. {
  101. PROVIDE_HIDDEN (__exidx_start = .);
  102. *(.ARM.exidx* .gnu.linkonce.armexidx.*)
  103. PROVIDE_HIDDEN (__exidx_end = .);
  104. }
  105. .eh_frame_hdr : { *(.eh_frame_hdr) *(.eh_frame_entry .eh_frame_entry.*) }
  106. .eh_frame : ONLY_IF_RO { KEEP (*(.eh_frame)) *(.eh_frame.*) }
  107. .gcc_except_table : ONLY_IF_RO { *(.gcc_except_table .gcc_except_table.*) }
  108. .gnu_extab : ONLY_IF_RO { *(.gnu_extab*) }
  109. /* These sections are generated by the Sun/Oracle C++ compiler. */
  110. .exception_ranges : ONLY_IF_RO { *(.exception_ranges*) }
  111. /* Adjust the address for the data segment. We want to adjust up to
  112. the same address within the page on the next page up. */
  113. . = ALIGN(CONSTANT (MAXPAGESIZE)) + (. & (CONSTANT (MAXPAGESIZE) - 1));
  114. /* Exception handling */
  115. .eh_frame : ONLY_IF_RW { KEEP (*(.eh_frame)) *(.eh_frame.*) }
  116. .gnu_extab : ONLY_IF_RW { *(.gnu_extab) }
  117. .gcc_except_table : ONLY_IF_RW { *(.gcc_except_table .gcc_except_table.*) }
  118. .exception_ranges : ONLY_IF_RW { *(.exception_ranges*) }
  119. /* Thread Local Storage sections */
  120. .tdata :
  121. {
  122. PROVIDE_HIDDEN (__tdata_start = .);
  123. *(.tdata .tdata.* .gnu.linkonce.td.*)
  124. }
  125. .tbss : { *(.tbss .tbss.* .gnu.linkonce.tb.*) *(.tcommon) }
  126. .preinit_array :
  127. {
  128. PROVIDE_HIDDEN (__preinit_array_start = .);
  129. KEEP (*(.preinit_array))
  130. PROVIDE_HIDDEN (__preinit_array_end = .);
  131. }
  132. .init_array :
  133. {
  134. PROVIDE_HIDDEN (__init_array_start = .);
  135. KEEP (*(SORT_BY_INIT_PRIORITY(.init_array.*) SORT_BY_INIT_PRIORITY(.ctors.*)))
  136. KEEP (*(.init_array EXCLUDE_FILE (*crtbegin.o *crtbegin?.o *crtend.o *crtend?.o ) .ctors))
  137. PROVIDE_HIDDEN (__init_array_end = .);
  138. }
  139. .fini_array :
  140. {
  141. PROVIDE_HIDDEN (__fini_array_start = .);
  142. KEEP (*(SORT_BY_INIT_PRIORITY(.fini_array.*) SORT_BY_INIT_PRIORITY(.dtors.*)))
  143. KEEP (*(.fini_array EXCLUDE_FILE (*crtbegin.o *crtbegin?.o *crtend.o *crtend?.o ) .dtors))
  144. PROVIDE_HIDDEN (__fini_array_end = .);
  145. }
  146. .ctors :
  147. {
  148. /* gcc uses crtbegin.o to find the start of
  149. the constructors, so we make sure it is
  150. first. Because this is a wildcard, it
  151. doesn't matter if the user does not
  152. actually link against crtbegin.o; the
  153. linker won't look for a file to match a
  154. wildcard. The wildcard also means that it
  155. doesn't matter which directory crtbegin.o
  156. is in. */
  157. KEEP (*crtbegin.o(.ctors))
  158. KEEP (*crtbegin?.o(.ctors))
  159. /* We don't want to include the .ctor section from
  160. the crtend.o file until after the sorted ctors.
  161. The .ctor section from the crtend file contains the
  162. end of ctors marker and it must be last */
  163. KEEP (*(EXCLUDE_FILE (*crtend.o *crtend?.o ) .ctors))
  164. KEEP (*(SORT(.ctors.*)))
  165. KEEP (*(.ctors))
  166. }
  167. .dtors :
  168. {
  169. KEEP (*crtbegin.o(.dtors))
  170. KEEP (*crtbegin?.o(.dtors))
  171. KEEP (*(EXCLUDE_FILE (*crtend.o *crtend?.o ) .dtors))
  172. KEEP (*(SORT(.dtors.*)))
  173. KEEP (*(.dtors))
  174. }
  175. .jcr : { KEEP (*(.jcr)) }
  176. .data.rel.ro : { *(.data.rel.ro.local* .gnu.linkonce.d.rel.ro.local.*) *(.data.rel.ro .data.rel.ro.* .gnu.linkonce.d.rel.ro.*) }
  177. .dynamic : { *(.dynamic) }
  178. .got : { *(.got.plt) *(.igot.plt) *(.got) *(.igot) }
  179. .data :
  180. {
  181. __data_start = .;
  182. *(.data .data.* .gnu.linkonce.d.*)
  183. SORT(CONSTRUCTORS)
  184. }
  185. .data1 : { *(.data1) }
  186. _edata = .; PROVIDE (edata = .);
  187. . = .;
  188. __bss_start = .;
  189. __bss_start__ = .;
  190. .bss :
  191. {
  192. *(.dynbss)
  193. *(.bss .bss.* .gnu.linkonce.b.*)
  194. *(COMMON)
  195. /* Align here to ensure that the .bss section occupies space up to
  196. _end. Align after .bss to ensure correct alignment even if the
  197. .bss section disappears because there are no input sections.
  198. FIXME: Why do we need it? When there is no .bss section, we do not
  199. pad the .data section. */
  200. . = ALIGN(. != 0 ? 32 / 8 : 1);
  201. }
  202. _bss_end__ = .; __bss_end__ = .;
  203. . = ALIGN(32 / 8);
  204. . = SEGMENT_START("ldata-segment", .);
  205. . = ALIGN(32 / 8);
  206. __end__ = .;
  207. _end = .; PROVIDE (end = .);
  208. .stack 0x80000 :
  209. {
  210. _stack = .;
  211. *(.stack)
  212. }
  213. /* Stabs debugging sections. */
  214. .stab 0 : { *(.stab) }
  215. .stabstr 0 : { *(.stabstr) }
  216. .stab.excl 0 : { *(.stab.excl) }
  217. .stab.exclstr 0 : { *(.stab.exclstr) }
  218. .stab.index 0 : { *(.stab.index) }
  219. .stab.indexstr 0 : { *(.stab.indexstr) }
  220. .comment 0 : { *(.comment) }
  221. .gnu.build.attributes : { *(.gnu.build.attributes .gnu.build.attributes.*) }
  222. /* DWARF debug sections.
  223. Symbols in the DWARF debugging sections are relative to the beginning
  224. of the section so we begin them at 0. */
  225. /* DWARF 1 */
  226. .debug 0 : { *(.debug) }
  227. .line 0 : { *(.line) }
  228. /* GNU DWARF 1 extensions */
  229. .debug_srcinfo 0 : { *(.debug_srcinfo) }
  230. .debug_sfnames 0 : { *(.debug_sfnames) }
  231. /* DWARF 1.1 and DWARF 2 */
  232. .debug_aranges 0 : { *(.debug_aranges) }
  233. .debug_pubnames 0 : { *(.debug_pubnames) }
  234. /* DWARF 2 */
  235. .debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) }
  236. .debug_abbrev 0 : { *(.debug_abbrev) }
  237. .debug_line 0 : { *(.debug_line .debug_line.* .debug_line_end) }
  238. .debug_frame 0 : { *(.debug_frame) }
  239. .debug_str 0 : { *(.debug_str) }
  240. .debug_loc 0 : { *(.debug_loc) }
  241. .debug_macinfo 0 : { *(.debug_macinfo) }
  242. /* SGI/MIPS DWARF 2 extensions */
  243. .debug_weaknames 0 : { *(.debug_weaknames) }
  244. .debug_funcnames 0 : { *(.debug_funcnames) }
  245. .debug_typenames 0 : { *(.debug_typenames) }
  246. .debug_varnames 0 : { *(.debug_varnames) }
  247. /* DWARF 3 */
  248. .debug_pubtypes 0 : { *(.debug_pubtypes) }
  249. .debug_ranges 0 : { *(.debug_ranges) }
  250. /* DWARF Extension. */
  251. .debug_macro 0 : { *(.debug_macro) }
  252. .debug_addr 0 : { *(.debug_addr) }
  253. .ARM.attributes 0 : { KEEP (*(.ARM.attributes)) KEEP (*(.gnu.attributes)) }
  254. .note.gnu.arm.ident 0 : { KEEP (*(.note.gnu.arm.ident)) }
  255. /* This section contains data that is not initialised during load
  256. *or* application reset. */
  257. .noinit (NOLOAD) :
  258. {
  259. . = ALIGN(2);
  260. PROVIDE (__noinit_start = .);
  261. *(.noinit)
  262. . = ALIGN(2);
  263. PROVIDE (__noinit_end = .);
  264. }
  265. /DISCARD/ : { *(.note.GNU-stack) *(.gnu_debuglink) *(.gnu.lto_*) }
  266. }