dyn.lds.S 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176
  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. } =0x90909090
  67. .fini : {
  68. KEEP (*(.fini))
  69. } =0x90909090
  70. .kstrtab : { *(.kstrtab) }
  71. #include "asm/common.lds.S"
  72. init.data : { *(.init.data) }
  73. /* Ensure the __preinit_array_start label is properly aligned. We
  74. could instead move the label definition inside the section, but
  75. the linker would then create the section even if it turns out to
  76. be empty, which isn't pretty. */
  77. . = ALIGN(32 / 8);
  78. .preinit_array : { *(.preinit_array) }
  79. .init_array : { *(.init_array) }
  80. .fini_array : { *(.fini_array) }
  81. .data : {
  82. . = ALIGN(KERNEL_STACK_SIZE); /* init_task */
  83. *(.data.init_task)
  84. *(.data .data.* .gnu.linkonce.d.*)
  85. SORT(CONSTRUCTORS)
  86. }
  87. .data1 : { *(.data1) }
  88. .tdata : { *(.tdata .tdata.* .gnu.linkonce.td.*) }
  89. .tbss : { *(.tbss .tbss.* .gnu.linkonce.tb.*) *(.tcommon) }
  90. .eh_frame : { KEEP (*(.eh_frame)) }
  91. .gcc_except_table : { *(.gcc_except_table) }
  92. .dynamic : { *(.dynamic) }
  93. .ctors : {
  94. /* gcc uses crtbegin.o to find the start of
  95. the constructors, so we make sure it is
  96. first. Because this is a wildcard, it
  97. doesn't matter if the user does not
  98. actually link against crtbegin.o; the
  99. linker won't look for a file to match a
  100. wildcard. The wildcard also means that it
  101. doesn't matter which directory crtbegin.o
  102. is in. */
  103. KEEP (*crtbegin.o(.ctors))
  104. /* We don't want to include the .ctor section from
  105. from the crtend.o file until after the sorted ctors.
  106. The .ctor section from the crtend file contains the
  107. end of ctors marker and it must be last */
  108. KEEP (*(EXCLUDE_FILE (*crtend.o ) .ctors))
  109. KEEP (*(SORT(.ctors.*)))
  110. KEEP (*(.ctors))
  111. }
  112. .dtors : {
  113. KEEP (*crtbegin.o(.dtors))
  114. KEEP (*(EXCLUDE_FILE (*crtend.o ) .dtors))
  115. KEEP (*(SORT(.dtors.*)))
  116. KEEP (*(.dtors))
  117. }
  118. .jcr : { KEEP (*(.jcr)) }
  119. .got : { *(.got.plt) *(.got) }
  120. _edata = .;
  121. PROVIDE (edata = .);
  122. __bss_start = .;
  123. .bss : {
  124. *(.dynbss)
  125. *(.bss .bss.* .gnu.linkonce.b.*)
  126. *(COMMON)
  127. /* Align here to ensure that the .bss section occupies space up to
  128. _end. Align after .bss to ensure correct alignment even if the
  129. .bss section disappears because there are no input sections. */
  130. . = ALIGN(32 / 8);
  131. . = ALIGN(32 / 8);
  132. }
  133. _end = .;
  134. PROVIDE (end = .);
  135. /* Stabs debugging sections. */
  136. .stab 0 : { *(.stab) }
  137. .stabstr 0 : { *(.stabstr) }
  138. .stab.excl 0 : { *(.stab.excl) }
  139. .stab.exclstr 0 : { *(.stab.exclstr) }
  140. .stab.index 0 : { *(.stab.index) }
  141. .stab.indexstr 0 : { *(.stab.indexstr) }
  142. .comment 0 : { *(.comment) }
  143. /* DWARF debug sections.
  144. Symbols in the DWARF debugging sections are relative to the beginning
  145. of the section so we begin them at 0. */
  146. /* DWARF 1 */
  147. .debug 0 : { *(.debug) }
  148. .line 0 : { *(.line) }
  149. /* GNU DWARF 1 extensions */
  150. .debug_srcinfo 0 : { *(.debug_srcinfo) }
  151. .debug_sfnames 0 : { *(.debug_sfnames) }
  152. /* DWARF 1.1 and DWARF 2 */
  153. .debug_aranges 0 : { *(.debug_aranges) }
  154. .debug_pubnames 0 : { *(.debug_pubnames) }
  155. /* DWARF 2 */
  156. .debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) }
  157. .debug_abbrev 0 : { *(.debug_abbrev) }
  158. .debug_line 0 : { *(.debug_line) }
  159. .debug_frame 0 : { *(.debug_frame) }
  160. .debug_str 0 : { *(.debug_str) }
  161. .debug_loc 0 : { *(.debug_loc) }
  162. .debug_macinfo 0 : { *(.debug_macinfo) }
  163. /* SGI/MIPS DWARF 2 extensions */
  164. .debug_weaknames 0 : { *(.debug_weaknames) }
  165. .debug_funcnames 0 : { *(.debug_funcnames) }
  166. .debug_typenames 0 : { *(.debug_typenames) }
  167. .debug_varnames 0 : { *(.debug_varnames) }
  168. }