Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

263 lines
9.4KB

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