vmlinux.lds.S 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160
  1. /* ld script to make s390 Linux kernel
  2. * Written by Martin Schwidefsky (schwidefsky@de.ibm.com)
  3. */
  4. #include <asm/page.h>
  5. #include <asm-generic/vmlinux.lds.h>
  6. #ifndef CONFIG_64BIT
  7. OUTPUT_FORMAT("elf32-s390", "elf32-s390", "elf32-s390")
  8. OUTPUT_ARCH(s390)
  9. ENTRY(_start)
  10. jiffies = jiffies_64 + 4;
  11. #else
  12. OUTPUT_FORMAT("elf64-s390", "elf64-s390", "elf64-s390")
  13. OUTPUT_ARCH(s390:64-bit)
  14. ENTRY(_start)
  15. jiffies = jiffies_64;
  16. #endif
  17. SECTIONS
  18. {
  19. . = 0x00000000;
  20. .text : {
  21. _text = .; /* Text and read-only data */
  22. *(.text.head)
  23. TEXT_TEXT
  24. SCHED_TEXT
  25. LOCK_TEXT
  26. KPROBES_TEXT
  27. *(.fixup)
  28. *(.gnu.warning)
  29. } = 0x0700
  30. _etext = .; /* End of text section */
  31. RODATA
  32. #ifdef CONFIG_SHARED_KERNEL
  33. . = ALIGN(0x100000); /* VM shared segments are 1MB aligned */
  34. #endif
  35. . = ALIGN(PAGE_SIZE);
  36. _eshared = .; /* End of shareable data */
  37. . = ALIGN(16); /* Exception table */
  38. __ex_table : {
  39. __start___ex_table = .;
  40. *(__ex_table)
  41. __stop___ex_table = .;
  42. }
  43. NOTES
  44. BUG_TABLE
  45. .data : { /* Data */
  46. DATA_DATA
  47. CONSTRUCTORS
  48. }
  49. . = ALIGN(PAGE_SIZE);
  50. .data_nosave : {
  51. __nosave_begin = .;
  52. *(.data.nosave)
  53. }
  54. . = ALIGN(PAGE_SIZE);
  55. __nosave_end = .;
  56. . = ALIGN(PAGE_SIZE);
  57. .data.page_aligned : {
  58. *(.data.idt)
  59. }
  60. . = ALIGN(0x100);
  61. .data.cacheline_aligned : {
  62. *(.data.cacheline_aligned)
  63. }
  64. . = ALIGN(0x100);
  65. .data.read_mostly : {
  66. *(.data.read_mostly)
  67. }
  68. _edata = .; /* End of data section */
  69. . = ALIGN(2 * PAGE_SIZE); /* init_task */
  70. .data.init_task : {
  71. *(.data.init_task)
  72. }
  73. /* will be freed after init */
  74. . = ALIGN(PAGE_SIZE); /* Init code and data */
  75. __init_begin = .;
  76. .init.text : {
  77. _sinittext = .;
  78. *(.init.text)
  79. _einittext = .;
  80. }
  81. /*
  82. * .exit.text is discarded at runtime, not link time,
  83. * to deal with references from __bug_table
  84. */
  85. .exit.text : {
  86. *(.exit.text)
  87. }
  88. .init.data : {
  89. *(.init.data)
  90. }
  91. . = ALIGN(0x100);
  92. .init.setup : {
  93. __setup_start = .;
  94. *(.init.setup)
  95. __setup_end = .;
  96. }
  97. .initcall.init : {
  98. __initcall_start = .;
  99. INITCALLS
  100. __initcall_end = .;
  101. }
  102. .con_initcall.init : {
  103. __con_initcall_start = .;
  104. *(.con_initcall.init)
  105. __con_initcall_end = .;
  106. }
  107. SECURITY_INIT
  108. #ifdef CONFIG_BLK_DEV_INITRD
  109. . = ALIGN(0x100);
  110. .init.ramfs : {
  111. __initramfs_start = .;
  112. *(.init.ramfs)
  113. . = ALIGN(2);
  114. __initramfs_end = .;
  115. }
  116. #endif
  117. PERCPU(PAGE_SIZE)
  118. . = ALIGN(PAGE_SIZE);
  119. __init_end = .; /* freed after init ends here */
  120. /* BSS */
  121. .bss : {
  122. __bss_start = .;
  123. *(.bss)
  124. . = ALIGN(2);
  125. __bss_stop = .;
  126. }
  127. _end = . ;
  128. /* Sections to be discarded */
  129. /DISCARD/ : {
  130. *(.exit.data)
  131. *(.exitcall.exit)
  132. }
  133. /* Debugging sections. */
  134. STABS_DEBUG
  135. DWARF_DEBUG
  136. }