vmlinux.lds 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174
  1. /* Align . to a 8 byte boundary equals to maximum function alignment. */
  2. /* sched.text is aling to function alignment to secure we have same
  3. * address even at second ld pass when generating System.map */
  4. /* spinlock.text is aling to function alignment to secure we have same
  5. * address even at second ld pass when generating System.map */
  6. /* DWARF debug sections.
  7. Symbols in the DWARF debugging sections are relative to
  8. the beginning of the section so we begin them at 0. */
  9. /* Stabs debugging sections. */
  10. OUTPUT_ARCH(powerpc:common)
  11. jiffies = jiffies_64 + 4;
  12. SECTIONS
  13. {
  14. /* Read-only sections, merged into text segment: */
  15. . = + SIZEOF_HEADERS;
  16. .interp : { *(.interp) }
  17. .hash : { *(.hash) }
  18. .dynsym : { *(.dynsym) }
  19. .dynstr : { *(.dynstr) }
  20. .rel.text : { *(.rel.text) }
  21. .rela.text : { *(.rela.text) }
  22. .rel.data : { *(.rel.data) }
  23. .rela.data : { *(.rela.data) }
  24. .rel.rodata : { *(.rel.rodata) }
  25. .rela.rodata : { *(.rela.rodata) }
  26. .rel.got : { *(.rel.got) }
  27. .rela.got : { *(.rela.got) }
  28. .rel.ctors : { *(.rel.ctors) }
  29. .rela.ctors : { *(.rela.ctors) }
  30. .rel.dtors : { *(.rel.dtors) }
  31. .rela.dtors : { *(.rela.dtors) }
  32. .rel.bss : { *(.rel.bss) }
  33. .rela.bss : { *(.rela.bss) }
  34. .rel.plt : { *(.rel.plt) }
  35. .rela.plt : { *(.rela.plt) }
  36. /* .init : { *(.init) } =0*/
  37. .plt : { *(.plt) }
  38. .text :
  39. {
  40. *(.text)
  41. . = ALIGN(8); __sched_text_start = .; *(.sched.text) __sched_text_end = .;
  42. . = ALIGN(8); __lock_text_start = .; *(.spinlock.text) __lock_text_end = .;
  43. *(.fixup)
  44. *(.got1)
  45. __got2_start = .;
  46. *(.got2)
  47. __got2_end = .;
  48. }
  49. _etext = .;
  50. PROVIDE (etext = .);
  51. .rodata : AT(ADDR(.rodata) - 0) { *(.rodata) *(.rodata.*) *(__vermagic) } .rodata1 : AT(ADDR(.rodata1) - 0) { *(.rodata1) } .pci_fixup : AT(ADDR(.pci_fixup) - 0) { __start_pci_fixups_early = .; *(.pci_fixup_early) __end_pci_fixups_early = .; __start_pci_fixups_header = .; *(.pci_fixup_header) __end_pci_fixups_header = .; __start_pci_fixups_final = .; *(.pci_fixup_final) __end_pci_fixups_final = .; __start_pci_fixups_enable = .; *(.pci_fixup_enable) __end_pci_fixups_enable = .; } __ksymtab : AT(ADDR(__ksymtab) - 0) { __start___ksymtab = .; *(__ksymtab) __stop___ksymtab = .; } __ksymtab_gpl : AT(ADDR(__ksymtab_gpl) - 0) { __start___ksymtab_gpl = .; *(__ksymtab_gpl) __stop___ksymtab_gpl = .; } __kcrctab : AT(ADDR(__kcrctab) - 0) { __start___kcrctab = .; *(__kcrctab) __stop___kcrctab = .; } __kcrctab_gpl : AT(ADDR(__kcrctab_gpl) - 0) { __start___kcrctab_gpl = .; *(__kcrctab_gpl) __stop___kcrctab_gpl = .; } __ksymtab_strings : AT(ADDR(__ksymtab_strings) - 0) { *(__ksymtab_strings) } __param : AT(ADDR(__param) - 0) { __start___param = .; *(__param) __stop___param = .; }
  52. .fini : { *(.fini) } =0
  53. .ctors : { *(.ctors) }
  54. .dtors : { *(.dtors) }
  55. .fixup : { *(.fixup) }
  56. __ex_table : {
  57. __start___ex_table = .;
  58. *(__ex_table)
  59. __stop___ex_table = .;
  60. }
  61. __bug_table : {
  62. __start___bug_table = .;
  63. *(__bug_table)
  64. __stop___bug_table = .;
  65. }
  66. /* Read-write section, merged into data segment: */
  67. . = ALIGN(4096);
  68. .data :
  69. {
  70. *(.data)
  71. *(.data1)
  72. *(.sdata)
  73. *(.sdata2)
  74. *(.got.plt) *(.got)
  75. *(.dynamic)
  76. CONSTRUCTORS
  77. }
  78. . = ALIGN(4096);
  79. __nosave_begin = .;
  80. .data_nosave : { *(.data.nosave) }
  81. . = ALIGN(4096);
  82. __nosave_end = .;
  83. . = ALIGN(32);
  84. .data.cacheline_aligned : { *(.data.cacheline_aligned) }
  85. _edata = .;
  86. PROVIDE (edata = .);
  87. . = ALIGN(8192);
  88. .data.init_task : { *(.data.init_task) }
  89. . = ALIGN(4096);
  90. __init_begin = .;
  91. .init.text : {
  92. _sinittext = .;
  93. *(.init.text)
  94. _einittext = .;
  95. }
  96. /* .exit.text is discarded at runtime, not link time,
  97. to deal with references from __bug_table */
  98. .exit.text : { *(.exit.text) }
  99. .init.data : {
  100. *(.init.data);
  101. __vtop_table_begin = .;
  102. *(.vtop_fixup);
  103. __vtop_table_end = .;
  104. __ptov_table_begin = .;
  105. *(.ptov_fixup);
  106. __ptov_table_end = .;
  107. }
  108. . = ALIGN(16);
  109. __setup_start = .;
  110. .init.setup : { *(.init.setup) }
  111. __setup_end = .;
  112. __initcall_start = .;
  113. .initcall.init : {
  114. *(.initcall1.init)
  115. *(.initcall2.init)
  116. *(.initcall3.init)
  117. *(.initcall4.init)
  118. *(.initcall5.init)
  119. *(.initcall6.init)
  120. *(.initcall7.init)
  121. }
  122. __initcall_end = .;
  123. __con_initcall_start = .;
  124. .con_initcall.init : { *(.con_initcall.init) }
  125. __con_initcall_end = .;
  126. .security_initcall.init : AT(ADDR(.security_initcall.init) - 0) { __security_initcall_start = .; *(.security_initcall.init) __security_initcall_end = .; }
  127. __start___ftr_fixup = .;
  128. __ftr_fixup : { *(__ftr_fixup) }
  129. __stop___ftr_fixup = .;
  130. . = ALIGN(32);
  131. __per_cpu_start = .;
  132. .data.percpu : { *(.data.percpu) }
  133. __per_cpu_end = .;
  134. . = ALIGN(4096);
  135. __initramfs_start = .;
  136. .init.ramfs : { *(.init.ramfs) }
  137. __initramfs_end = .;
  138. . = ALIGN(4096);
  139. __init_end = .;
  140. . = ALIGN(4096);
  141. _sextratext = .;
  142. _eextratext = .;
  143. __bss_start = .;
  144. .bss :
  145. {
  146. *(.sbss) *(.scommon)
  147. *(.dynbss)
  148. *(.bss)
  149. *(COMMON)
  150. }
  151. __bss_stop = .;
  152. _end = . ;
  153. PROVIDE (end = .);
  154. /* Sections to be discarded. */
  155. /DISCARD/ : {
  156. *(.exitcall.exit)
  157. *(.exit.data)
  158. }
  159. }