dyn.lds.S 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182
  1. #include <asm-generic/vmlinux.lds.h>
  2. OUTPUT_FORMAT(ELF_FORMAT)
  3. OUTPUT_ARCH(ELF_ARCH)
  4. ENTRY(_start)
  5. jiffies = jiffies_64;
  6. SECTIONS
  7. {
  8. PROVIDE (__executable_start = START);
  9. . = START + SIZEOF_HEADERS;
  10. .interp : { *(.interp) }
  11. /* Used in arch/um/kernel/mem.c. Any memory between START and __binary_start
  12. * is remapped.*/
  13. __binary_start = .;
  14. . = ALIGN(4096); /* Init code and data */
  15. _stext = .;
  16. __init_begin = .;
  17. .init.text : {
  18. _sinittext = .;
  19. *(.init.text)
  20. _einittext = .;
  21. }
  22. . = ALIGN(4096);
  23. /* Read-only sections, merged into text segment: */
  24. .hash : { *(.hash) }
  25. .dynsym : { *(.dynsym) }
  26. .dynstr : { *(.dynstr) }
  27. .gnu.version : { *(.gnu.version) }
  28. .gnu.version_d : { *(.gnu.version_d) }
  29. .gnu.version_r : { *(.gnu.version_r) }
  30. .rel.init : { *(.rel.init) }
  31. .rela.init : { *(.rela.init) }
  32. .rel.text : { *(.rel.text .rel.text.* .rel.gnu.linkonce.t.*) }
  33. .rela.text : { *(.rela.text .rela.text.* .rela.gnu.linkonce.t.*) }
  34. .rel.fini : { *(.rel.fini) }
  35. .rela.fini : { *(.rela.fini) }
  36. .rel.rodata : { *(.rel.rodata .rel.rodata.* .rel.gnu.linkonce.r.*) }
  37. .rela.rodata : { *(.rela.rodata .rela.rodata.* .rela.gnu.linkonce.r.*) }
  38. .rel.data : { *(.rel.data .rel.data.* .rel.gnu.linkonce.d.*) }
  39. .rela.data : { *(.rela.data .rela.data.* .rela.gnu.linkonce.d.*) }
  40. .rel.tdata : { *(.rel.tdata .rel.tdata.* .rel.gnu.linkonce.td.*) }
  41. .rela.tdata : { *(.rela.tdata .rela.tdata.* .rela.gnu.linkonce.td.*) }
  42. .rel.tbss : { *(.rel.tbss .rel.tbss.* .rel.gnu.linkonce.tb.*) }
  43. .rela.tbss : { *(.rela.tbss .rela.tbss.* .rela.gnu.linkonce.tb.*) }
  44. .rel.ctors : { *(.rel.ctors) }
  45. .rela.ctors : { *(.rela.ctors) }
  46. .rel.dtors : { *(.rel.dtors) }
  47. .rela.dtors : { *(.rela.dtors) }
  48. .rel.got : { *(.rel.got) }
  49. .rela.got : { *(.rela.got) }
  50. .rel.bss : { *(.rel.bss .rel.bss.* .rel.gnu.linkonce.b.*) }
  51. .rela.bss : { *(.rela.bss .rela.bss.* .rela.gnu.linkonce.b.*) }
  52. .rel.plt : { *(.rel.plt) }
  53. .rela.plt : { *(.rela.plt) }
  54. .init : {
  55. KEEP (*(.init))
  56. } =0x90909090
  57. .plt : { *(.plt) }
  58. .text : {
  59. *(.text)
  60. SCHED_TEXT
  61. LOCK_TEXT
  62. *(.fixup)
  63. *(.stub .text.* .gnu.linkonce.t.*)
  64. /* .gnu.warning sections are handled specially by elf32.em. */
  65. *(.gnu.warning)
  66. . = ALIGN(4096);
  67. __syscall_stub_start = .;
  68. *(.__syscall_stub*)
  69. __syscall_stub_end = .;
  70. . = ALIGN(4096);
  71. } =0x90909090
  72. .fini : {
  73. KEEP (*(.fini))
  74. } =0x90909090
  75. .kstrtab : { *(.kstrtab) }
  76. #include "asm/common.lds.S"
  77. init.data : { *(.init.data) }
  78. /* Ensure the __preinit_array_start label is properly aligned. We
  79. could instead move the label definition inside the section, but
  80. the linker would then create the section even if it turns out to
  81. be empty, which isn't pretty. */
  82. . = ALIGN(32 / 8);
  83. .preinit_array : { *(.preinit_array) }
  84. .init_array : { *(.init_array) }
  85. .fini_array : { *(.fini_array) }
  86. .data : {
  87. . = ALIGN(KERNEL_STACK_SIZE); /* init_task */
  88. *(.data.init_task)
  89. *(.data .data.* .gnu.linkonce.d.*)
  90. SORT(CONSTRUCTORS)
  91. }
  92. .data1 : { *(.data1) }
  93. .tdata : { *(.tdata .tdata.* .gnu.linkonce.td.*) }
  94. .tbss : { *(.tbss .tbss.* .gnu.linkonce.tb.*) *(.tcommon) }
  95. .eh_frame : { KEEP (*(.eh_frame)) }
  96. .gcc_except_table : { *(.gcc_except_table) }
  97. .dynamic : { *(.dynamic) }
  98. .ctors : {
  99. /* gcc uses crtbegin.o to find the start of
  100. the constructors, so we make sure it is
  101. first. Because this is a wildcard, it
  102. doesn't matter if the user does not
  103. actually link against crtbegin.o; the
  104. linker won't look for a file to match a
  105. wildcard. The wildcard also means that it
  106. doesn't matter which directory crtbegin.o
  107. is in. */
  108. KEEP (*crtbegin.o(.ctors))
  109. /* We don't want to include the .ctor section from
  110. from the crtend.o file until after the sorted ctors.
  111. The .ctor section from the crtend file contains the
  112. end of ctors marker and it must be last */
  113. KEEP (*(EXCLUDE_FILE (*crtend.o ) .ctors))
  114. KEEP (*(SORT(.ctors.*)))
  115. KEEP (*(.ctors))
  116. }
  117. .dtors : {
  118. KEEP (*crtbegin.o(.dtors))
  119. KEEP (*(EXCLUDE_FILE (*crtend.o ) .dtors))
  120. KEEP (*(SORT(.dtors.*)))
  121. KEEP (*(.dtors))
  122. }
  123. .jcr : { KEEP (*(.jcr)) }
  124. .got : { *(.got.plt) *(.got) }
  125. _edata = .;
  126. PROVIDE (edata = .);
  127. __bss_start = .;
  128. .bss : {
  129. *(.dynbss)
  130. *(.bss .bss.* .gnu.linkonce.b.*)
  131. *(COMMON)
  132. /* Align here to ensure that the .bss section occupies space up to
  133. _end. Align after .bss to ensure correct alignment even if the
  134. .bss section disappears because there are no input sections. */
  135. . = ALIGN(32 / 8);
  136. . = ALIGN(32 / 8);
  137. }
  138. _end = .;
  139. PROVIDE (end = .);
  140. /* Stabs debugging sections. */
  141. .stab 0 : { *(.stab) }
  142. .stabstr 0 : { *(.stabstr) }
  143. .stab.excl 0 : { *(.stab.excl) }
  144. .stab.exclstr 0 : { *(.stab.exclstr) }
  145. .stab.index 0 : { *(.stab.index) }
  146. .stab.indexstr 0 : { *(.stab.indexstr) }
  147. .comment 0 : { *(.comment) }
  148. /* DWARF debug sections.
  149. Symbols in the DWARF debugging sections are relative to the beginning
  150. of the section so we begin them at 0. */
  151. /* DWARF 1 */
  152. .debug 0 : { *(.debug) }
  153. .line 0 : { *(.line) }
  154. /* GNU DWARF 1 extensions */
  155. .debug_srcinfo 0 : { *(.debug_srcinfo) }
  156. .debug_sfnames 0 : { *(.debug_sfnames) }
  157. /* DWARF 1.1 and DWARF 2 */
  158. .debug_aranges 0 : { *(.debug_aranges) }
  159. .debug_pubnames 0 : { *(.debug_pubnames) }
  160. /* DWARF 2 */
  161. .debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) }
  162. .debug_abbrev 0 : { *(.debug_abbrev) }
  163. .debug_line 0 : { *(.debug_line) }
  164. .debug_frame 0 : { *(.debug_frame) }
  165. .debug_str 0 : { *(.debug_str) }
  166. .debug_loc 0 : { *(.debug_loc) }
  167. .debug_macinfo 0 : { *(.debug_macinfo) }
  168. /* SGI/MIPS DWARF 2 extensions */
  169. .debug_weaknames 0 : { *(.debug_weaknames) }
  170. .debug_funcnames 0 : { *(.debug_funcnames) }
  171. .debug_typenames 0 : { *(.debug_typenames) }
  172. .debug_varnames 0 : { *(.debug_varnames) }
  173. }