dyn.lds.S 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160
  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_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. } =0x90909090
  70. . = ALIGN(4096);
  71. .syscall_stub : {
  72. __syscall_stub_start = .;
  73. *(.__syscall_stub*)
  74. __syscall_stub_end = .;
  75. }
  76. .fini : {
  77. KEEP (*(.fini))
  78. } =0x90909090
  79. .kstrtab : { *(.kstrtab) }
  80. #include "asm/common.lds.S"
  81. init.data : { *(.init.data) }
  82. /* Ensure the __preinit_array_start label is properly aligned. We
  83. could instead move the label definition inside the section, but
  84. the linker would then create the section even if it turns out to
  85. be empty, which isn't pretty. */
  86. . = ALIGN(32 / 8);
  87. .preinit_array : { *(.preinit_array) }
  88. .init_array : { *(.init_array) }
  89. .fini_array : { *(.fini_array) }
  90. .data : {
  91. . = ALIGN(KERNEL_STACK_SIZE); /* init_task */
  92. *(.data.init_task)
  93. . = ALIGN(KERNEL_STACK_SIZE);
  94. *(.data.init_irqstack)
  95. DATA_DATA
  96. *(.data.* .gnu.linkonce.d.*)
  97. SORT(CONSTRUCTORS)
  98. }
  99. .data1 : { *(.data1) }
  100. .tdata : { *(.tdata .tdata.* .gnu.linkonce.td.*) }
  101. .tbss : { *(.tbss .tbss.* .gnu.linkonce.tb.*) *(.tcommon) }
  102. .eh_frame : { KEEP (*(.eh_frame)) }
  103. .gcc_except_table : { *(.gcc_except_table) }
  104. .dynamic : { *(.dynamic) }
  105. .ctors : {
  106. /* gcc uses crtbegin.o to find the start of
  107. the constructors, so we make sure it is
  108. first. Because this is a wildcard, it
  109. doesn't matter if the user does not
  110. actually link against crtbegin.o; the
  111. linker won't look for a file to match a
  112. wildcard. The wildcard also means that it
  113. doesn't matter which directory crtbegin.o
  114. is in. */
  115. KEEP (*crtbegin.o(.ctors))
  116. /* We don't want to include the .ctor section from
  117. from the crtend.o file until after the sorted ctors.
  118. The .ctor section from the crtend file contains the
  119. end of ctors marker and it must be last */
  120. KEEP (*(EXCLUDE_FILE (*crtend.o ) .ctors))
  121. KEEP (*(SORT(.ctors.*)))
  122. KEEP (*(.ctors))
  123. }
  124. .dtors : {
  125. KEEP (*crtbegin.o(.dtors))
  126. KEEP (*(EXCLUDE_FILE (*crtend.o ) .dtors))
  127. KEEP (*(SORT(.dtors.*)))
  128. KEEP (*(.dtors))
  129. }
  130. .jcr : { KEEP (*(.jcr)) }
  131. .got : { *(.got.plt) *(.got) }
  132. _edata = .;
  133. PROVIDE (edata = .);
  134. .bss : {
  135. __bss_start = .;
  136. *(.dynbss)
  137. *(.bss .bss.* .gnu.linkonce.b.*)
  138. *(COMMON)
  139. /* Align here to ensure that the .bss section occupies space up to
  140. _end. Align after .bss to ensure correct alignment even if the
  141. .bss section disappears because there are no input sections. */
  142. . = ALIGN(32 / 8);
  143. . = ALIGN(32 / 8);
  144. }
  145. _end = .;
  146. PROVIDE (end = .);
  147. STABS_DEBUG
  148. DWARF_DEBUG
  149. }