armelfb_linux_eabi.xse 9.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248
  1. /* Script for -shared -z separate-code */
  2. /* Copyright (C) 2014-2021 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-bigarm", "elf32-bigarm",
  7. "elf32-littlearm")
  8. OUTPUT_ARCH(arm)
  9. ENTRY(_start)
  10. SEARCH_DIR("=/aarch64-none-linux-gnu/lib"); SEARCH_DIR("=/usr/local/lib"); SEARCH_DIR("=/lib"); SEARCH_DIR("=/usr/lib");
  11. SECTIONS
  12. {
  13. . = SEGMENT_START("text-segment", 0) + SIZEOF_HEADERS;
  14. .note.gnu.build-id : { *(.note.gnu.build-id) }
  15. .hash : { *(.hash) }
  16. .gnu.hash : { *(.gnu.hash) }
  17. .dynsym : { *(.dynsym) }
  18. .dynstr : { *(.dynstr) }
  19. .gnu.version : { *(.gnu.version) }
  20. .gnu.version_d : { *(.gnu.version_d) }
  21. .gnu.version_r : { *(.gnu.version_r) }
  22. .rel.init : { *(.rel.init) }
  23. .rela.init : { *(.rela.init) }
  24. .rel.text : { *(.rel.text .rel.text.* .rel.gnu.linkonce.t.*) }
  25. .rela.text : { *(.rela.text .rela.text.* .rela.gnu.linkonce.t.*) }
  26. .rel.fini : { *(.rel.fini) }
  27. .rela.fini : { *(.rela.fini) }
  28. .rel.rodata : { *(.rel.rodata .rel.rodata.* .rel.gnu.linkonce.r.*) }
  29. .rela.rodata : { *(.rela.rodata .rela.rodata.* .rela.gnu.linkonce.r.*) }
  30. .rel.data.rel.ro : { *(.rel.data.rel.ro .rel.data.rel.ro.* .rel.gnu.linkonce.d.rel.ro.*) }
  31. .rela.data.rel.ro : { *(.rela.data.rel.ro .rela.data.rel.ro.* .rela.gnu.linkonce.d.rel.ro.*) }
  32. .rel.data : { *(.rel.data .rel.data.* .rel.gnu.linkonce.d.*) }
  33. .rela.data : { *(.rela.data .rela.data.* .rela.gnu.linkonce.d.*) }
  34. .rel.tdata : { *(.rel.tdata .rel.tdata.* .rel.gnu.linkonce.td.*) }
  35. .rela.tdata : { *(.rela.tdata .rela.tdata.* .rela.gnu.linkonce.td.*) }
  36. .rel.tbss : { *(.rel.tbss .rel.tbss.* .rel.gnu.linkonce.tb.*) }
  37. .rela.tbss : { *(.rela.tbss .rela.tbss.* .rela.gnu.linkonce.tb.*) }
  38. .rel.ctors : { *(.rel.ctors) }
  39. .rela.ctors : { *(.rela.ctors) }
  40. .rel.dtors : { *(.rel.dtors) }
  41. .rela.dtors : { *(.rela.dtors) }
  42. .rel.got : { *(.rel.got) }
  43. .rela.got : { *(.rela.got) }
  44. .rel.bss : { *(.rel.bss .rel.bss.* .rel.gnu.linkonce.b.*) }
  45. .rela.bss : { *(.rela.bss .rela.bss.* .rela.gnu.linkonce.b.*) }
  46. .rel.iplt :
  47. {
  48. *(.rel.iplt)
  49. }
  50. .rela.iplt :
  51. {
  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. . = DATA_SEGMENT_ALIGN (CONSTANT (MAXPAGESIZE), CONSTANT (COMMONPAGESIZE));
  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. *(.tdata .tdata.* .gnu.linkonce.td.*)
  119. }
  120. .tbss : { *(.tbss .tbss.* .gnu.linkonce.tb.*) *(.tcommon) }
  121. .preinit_array :
  122. {
  123. KEEP (*(.preinit_array))
  124. }
  125. .init_array :
  126. {
  127. KEEP (*(SORT_BY_INIT_PRIORITY(.init_array.*) SORT_BY_INIT_PRIORITY(.ctors.*)))
  128. KEEP (*(.init_array EXCLUDE_FILE (*crtbegin.o *crtbegin?.o *crtend.o *crtend?.o ) .ctors))
  129. }
  130. .fini_array :
  131. {
  132. KEEP (*(SORT_BY_INIT_PRIORITY(.fini_array.*) SORT_BY_INIT_PRIORITY(.dtors.*)))
  133. KEEP (*(.fini_array EXCLUDE_FILE (*crtbegin.o *crtbegin?.o *crtend.o *crtend?.o ) .dtors))
  134. }
  135. .ctors :
  136. {
  137. /* gcc uses crtbegin.o to find the start of
  138. the constructors, so we make sure it is
  139. first. Because this is a wildcard, it
  140. doesn't matter if the user does not
  141. actually link against crtbegin.o; the
  142. linker won't look for a file to match a
  143. wildcard. The wildcard also means that it
  144. doesn't matter which directory crtbegin.o
  145. is in. */
  146. KEEP (*crtbegin.o(.ctors))
  147. KEEP (*crtbegin?.o(.ctors))
  148. /* We don't want to include the .ctor section from
  149. the crtend.o file until after the sorted ctors.
  150. The .ctor section from the crtend file contains the
  151. end of ctors marker and it must be last */
  152. KEEP (*(EXCLUDE_FILE (*crtend.o *crtend?.o ) .ctors))
  153. KEEP (*(SORT(.ctors.*)))
  154. KEEP (*(.ctors))
  155. }
  156. .dtors :
  157. {
  158. KEEP (*crtbegin.o(.dtors))
  159. KEEP (*crtbegin?.o(.dtors))
  160. KEEP (*(EXCLUDE_FILE (*crtend.o *crtend?.o ) .dtors))
  161. KEEP (*(SORT(.dtors.*)))
  162. KEEP (*(.dtors))
  163. }
  164. .jcr : { KEEP (*(.jcr)) }
  165. .data.rel.ro : { *(.data.rel.ro.local* .gnu.linkonce.d.rel.ro.local.*) *(.data.rel.ro .data.rel.ro.* .gnu.linkonce.d.rel.ro.*) }
  166. .dynamic : { *(.dynamic) }
  167. . = DATA_SEGMENT_RELRO_END (0, .);
  168. .got : { *(.got.plt) *(.igot.plt) *(.got) *(.igot) }
  169. .data :
  170. {
  171. PROVIDE (__data_start = .);
  172. *(.data .data.* .gnu.linkonce.d.*)
  173. SORT(CONSTRUCTORS)
  174. }
  175. .data1 : { *(.data1) }
  176. PROVIDE (_edata = .); PROVIDE (edata = .);
  177. . = .;
  178. PROVIDE (__bss_start = .);
  179. PROVIDE (__bss_start__ = .);
  180. .bss :
  181. {
  182. *(.dynbss)
  183. *(.bss .bss.* .gnu.linkonce.b.*)
  184. *(COMMON)
  185. /* Align here to ensure that the .bss section occupies space up to
  186. _end. Align after .bss to ensure correct alignment even if the
  187. .bss section disappears because there are no input sections.
  188. FIXME: Why do we need it? When there is no .bss section, we do not
  189. pad the .data section. */
  190. . = ALIGN(. != 0 ? 32 / 8 : 1);
  191. }
  192. PROVIDE (_bss_end__ = .); PROVIDE (__bss_end__ = .);
  193. . = ALIGN(32 / 8);
  194. . = SEGMENT_START("ldata-segment", .);
  195. . = ALIGN(32 / 8);
  196. PROVIDE (__end__ = .);
  197. PROVIDE (_end = .); PROVIDE (end = .);
  198. . = DATA_SEGMENT_END (.);
  199. /* Stabs debugging sections. */
  200. .stab 0 : { *(.stab) }
  201. .stabstr 0 : { *(.stabstr) }
  202. .stab.excl 0 : { *(.stab.excl) }
  203. .stab.exclstr 0 : { *(.stab.exclstr) }
  204. .stab.index 0 : { *(.stab.index) }
  205. .stab.indexstr 0 : { *(.stab.indexstr) }
  206. .comment 0 : { *(.comment) }
  207. .gnu.build.attributes : { *(.gnu.build.attributes .gnu.build.attributes.*) }
  208. /* DWARF debug sections.
  209. Symbols in the DWARF debugging sections are relative to the beginning
  210. of the section so we begin them at 0. */
  211. /* DWARF 1. */
  212. .debug 0 : { *(.debug) }
  213. .line 0 : { *(.line) }
  214. /* GNU DWARF 1 extensions. */
  215. .debug_srcinfo 0 : { *(.debug_srcinfo) }
  216. .debug_sfnames 0 : { *(.debug_sfnames) }
  217. /* DWARF 1.1 and DWARF 2. */
  218. .debug_aranges 0 : { *(.debug_aranges) }
  219. .debug_pubnames 0 : { *(.debug_pubnames) }
  220. /* DWARF 2. */
  221. .debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) }
  222. .debug_abbrev 0 : { *(.debug_abbrev) }
  223. .debug_line 0 : { *(.debug_line .debug_line.* .debug_line_end) }
  224. .debug_frame 0 : { *(.debug_frame) }
  225. .debug_str 0 : { *(.debug_str) }
  226. .debug_loc 0 : { *(.debug_loc) }
  227. .debug_macinfo 0 : { *(.debug_macinfo) }
  228. /* SGI/MIPS DWARF 2 extensions. */
  229. .debug_weaknames 0 : { *(.debug_weaknames) }
  230. .debug_funcnames 0 : { *(.debug_funcnames) }
  231. .debug_typenames 0 : { *(.debug_typenames) }
  232. .debug_varnames 0 : { *(.debug_varnames) }
  233. /* DWARF 3. */
  234. .debug_pubtypes 0 : { *(.debug_pubtypes) }
  235. .debug_ranges 0 : { *(.debug_ranges) }
  236. /* DWARF 5. */
  237. .debug_addr 0 : { *(.debug_addr) }
  238. .debug_line_str 0 : { *(.debug_line_str) }
  239. .debug_loclists 0 : { *(.debug_loclists) }
  240. .debug_macro 0 : { *(.debug_macro) }
  241. .debug_names 0 : { *(.debug_names) }
  242. .debug_rnglists 0 : { *(.debug_rnglists) }
  243. .debug_str_offsets 0 : { *(.debug_str_offsets) }
  244. .debug_sup 0 : { *(.debug_sup) }
  245. .gnu.attributes 0 : { KEEP (*(.gnu.attributes)) }
  246. .note.gnu.arm.ident 0 : { KEEP (*(.note.gnu.arm.ident)) }
  247. /DISCARD/ : { *(.note.GNU-stack) *(.gnu_debuglink) *(.gnu.lto_*) }
  248. }