dyn.lds.S 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157
  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. _text = .;
  16. _stext = .;
  17. __init_begin = .;
  18. .init.text : {
  19. _sinittext = .;
  20. *(.init.text)
  21. _einittext = .;
  22. }
  23. . = ALIGN(4096);
  24. /* Read-only sections, merged into text segment: */
  25. .hash : { *(.hash) }
  26. .gnu.hash : { *(.gnu.hash) }
  27. .dynsym : { *(.dynsym) }
  28. .dynstr : { *(.dynstr) }
  29. .gnu.version : { *(.gnu.version) }
  30. .gnu.version_d : { *(.gnu.version_d) }
  31. .gnu.version_r : { *(.gnu.version_r) }
  32. .rel.init : { *(.rel.init) }
  33. .rela.init : { *(.rela.init) }
  34. .rel.text : { *(.rel.text .rel.text.* .rel.gnu.linkonce.t.*) }
  35. .rela.text : { *(.rela.text .rela.text.* .rela.gnu.linkonce.t.*) }
  36. .rel.fini : { *(.rel.fini) }
  37. .rela.fini : { *(.rela.fini) }
  38. .rel.rodata : { *(.rel.rodata .rel.rodata.* .rel.gnu.linkonce.r.*) }
  39. .rela.rodata : { *(.rela.rodata .rela.rodata.* .rela.gnu.linkonce.r.*) }
  40. .rel.data : { *(.rel.data .rel.data.* .rel.gnu.linkonce.d.*) }
  41. .rela.data : { *(.rela.data .rela.data.* .rela.gnu.linkonce.d.*) }
  42. .rel.tdata : { *(.rel.tdata .rel.tdata.* .rel.gnu.linkonce.td.*) }
  43. .rela.tdata : { *(.rela.tdata .rela.tdata.* .rela.gnu.linkonce.td.*) }
  44. .rel.tbss : { *(.rel.tbss .rel.tbss.* .rel.gnu.linkonce.tb.*) }
  45. .rela.tbss : { *(.rela.tbss .rela.tbss.* .rela.gnu.linkonce.tb.*) }
  46. .rel.ctors : { *(.rel.ctors) }
  47. .rela.ctors : { *(.rela.ctors) }
  48. .rel.dtors : { *(.rel.dtors) }
  49. .rela.dtors : { *(.rela.dtors) }
  50. .rel.got : { *(.rel.got) }
  51. .rela.got : { *(.rela.got) }
  52. .rel.bss : { *(.rel.bss .rel.bss.* .rel.gnu.linkonce.b.*) }
  53. .rela.bss : { *(.rela.bss .rela.bss.* .rela.gnu.linkonce.b.*) }
  54. .rel.plt : { *(.rel.plt) }
  55. .rela.plt : { *(.rela.plt) }
  56. .init : {
  57. KEEP (*(.init))
  58. } =0x90909090
  59. .plt : { *(.plt) }
  60. .text : {
  61. *(.text)
  62. SCHED_TEXT
  63. LOCK_TEXT
  64. *(.fixup)
  65. *(.stub .text.* .gnu.linkonce.t.*)
  66. /* .gnu.warning sections are handled specially by elf32.em. */
  67. *(.gnu.warning)
  68. . = ALIGN(4096);
  69. __syscall_stub_start = .;
  70. *(.__syscall_stub*)
  71. __syscall_stub_end = .;
  72. . = ALIGN(4096);
  73. } =0x90909090
  74. .fini : {
  75. KEEP (*(.fini))
  76. } =0x90909090
  77. .kstrtab : { *(.kstrtab) }
  78. #include "asm/common.lds.S"
  79. init.data : { *(.init.data) }
  80. /* Ensure the __preinit_array_start label is properly aligned. We
  81. could instead move the label definition inside the section, but
  82. the linker would then create the section even if it turns out to
  83. be empty, which isn't pretty. */
  84. . = ALIGN(32 / 8);
  85. .preinit_array : { *(.preinit_array) }
  86. .init_array : { *(.init_array) }
  87. .fini_array : { *(.fini_array) }
  88. .data : {
  89. . = ALIGN(KERNEL_STACK_SIZE); /* init_task */
  90. *(.data.init_task)
  91. . = ALIGN(KERNEL_STACK_SIZE);
  92. *(.data.init_irqstack)
  93. *(.data .data.* .gnu.linkonce.d.*)
  94. SORT(CONSTRUCTORS)
  95. }
  96. .data1 : { *(.data1) }
  97. .tdata : { *(.tdata .tdata.* .gnu.linkonce.td.*) }
  98. .tbss : { *(.tbss .tbss.* .gnu.linkonce.tb.*) *(.tcommon) }
  99. .eh_frame : { KEEP (*(.eh_frame)) }
  100. .gcc_except_table : { *(.gcc_except_table) }
  101. .dynamic : { *(.dynamic) }
  102. .ctors : {
  103. /* gcc uses crtbegin.o to find the start of
  104. the constructors, so we make sure it is
  105. first. Because this is a wildcard, it
  106. doesn't matter if the user does not
  107. actually link against crtbegin.o; the
  108. linker won't look for a file to match a
  109. wildcard. The wildcard also means that it
  110. doesn't matter which directory crtbegin.o
  111. is in. */
  112. KEEP (*crtbegin.o(.ctors))
  113. /* We don't want to include the .ctor section from
  114. from the crtend.o file until after the sorted ctors.
  115. The .ctor section from the crtend file contains the
  116. end of ctors marker and it must be last */
  117. KEEP (*(EXCLUDE_FILE (*crtend.o ) .ctors))
  118. KEEP (*(SORT(.ctors.*)))
  119. KEEP (*(.ctors))
  120. }
  121. .dtors : {
  122. KEEP (*crtbegin.o(.dtors))
  123. KEEP (*(EXCLUDE_FILE (*crtend.o ) .dtors))
  124. KEEP (*(SORT(.dtors.*)))
  125. KEEP (*(.dtors))
  126. }
  127. .jcr : { KEEP (*(.jcr)) }
  128. .got : { *(.got.plt) *(.got) }
  129. _edata = .;
  130. PROVIDE (edata = .);
  131. __bss_start = .;
  132. .bss : {
  133. *(.dynbss)
  134. *(.bss .bss.* .gnu.linkonce.b.*)
  135. *(COMMON)
  136. /* Align here to ensure that the .bss section occupies space up to
  137. _end. Align after .bss to ensure correct alignment even if the
  138. .bss section disappears because there are no input sections. */
  139. . = ALIGN(32 / 8);
  140. . = ALIGN(32 / 8);
  141. }
  142. _end = .;
  143. PROVIDE (end = .);
  144. STABS_DEBUG
  145. DWARF_DEBUG
  146. }