dyn.lds.S 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155
  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. *(.data .data.* .gnu.linkonce.d.*)
  92. SORT(CONSTRUCTORS)
  93. }
  94. .data1 : { *(.data1) }
  95. .tdata : { *(.tdata .tdata.* .gnu.linkonce.td.*) }
  96. .tbss : { *(.tbss .tbss.* .gnu.linkonce.tb.*) *(.tcommon) }
  97. .eh_frame : { KEEP (*(.eh_frame)) }
  98. .gcc_except_table : { *(.gcc_except_table) }
  99. .dynamic : { *(.dynamic) }
  100. .ctors : {
  101. /* gcc uses crtbegin.o to find the start of
  102. the constructors, so we make sure it is
  103. first. Because this is a wildcard, it
  104. doesn't matter if the user does not
  105. actually link against crtbegin.o; the
  106. linker won't look for a file to match a
  107. wildcard. The wildcard also means that it
  108. doesn't matter which directory crtbegin.o
  109. is in. */
  110. KEEP (*crtbegin.o(.ctors))
  111. /* We don't want to include the .ctor section from
  112. from the crtend.o file until after the sorted ctors.
  113. The .ctor section from the crtend file contains the
  114. end of ctors marker and it must be last */
  115. KEEP (*(EXCLUDE_FILE (*crtend.o ) .ctors))
  116. KEEP (*(SORT(.ctors.*)))
  117. KEEP (*(.ctors))
  118. }
  119. .dtors : {
  120. KEEP (*crtbegin.o(.dtors))
  121. KEEP (*(EXCLUDE_FILE (*crtend.o ) .dtors))
  122. KEEP (*(SORT(.dtors.*)))
  123. KEEP (*(.dtors))
  124. }
  125. .jcr : { KEEP (*(.jcr)) }
  126. .got : { *(.got.plt) *(.got) }
  127. _edata = .;
  128. PROVIDE (edata = .);
  129. __bss_start = .;
  130. .bss : {
  131. *(.dynbss)
  132. *(.bss .bss.* .gnu.linkonce.b.*)
  133. *(COMMON)
  134. /* Align here to ensure that the .bss section occupies space up to
  135. _end. Align after .bss to ensure correct alignment even if the
  136. .bss section disappears because there are no input sections. */
  137. . = ALIGN(32 / 8);
  138. . = ALIGN(32 / 8);
  139. }
  140. _end = .;
  141. PROVIDE (end = .);
  142. STABS_DEBUG
  143. DWARF_DEBUG
  144. }