vmlinux.lds.S 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132
  1. /* ld script to make s390 Linux kernel
  2. * Written by Martin Schwidefsky (schwidefsky@de.ibm.com)
  3. */
  4. #include <asm-generic/vmlinux.lds.h>
  5. #ifndef CONFIG_64BIT
  6. OUTPUT_FORMAT("elf32-s390", "elf32-s390", "elf32-s390")
  7. OUTPUT_ARCH(s390)
  8. ENTRY(_start)
  9. jiffies = jiffies_64 + 4;
  10. #else
  11. OUTPUT_FORMAT("elf64-s390", "elf64-s390", "elf64-s390")
  12. OUTPUT_ARCH(s390:64-bit)
  13. ENTRY(_start)
  14. jiffies = jiffies_64;
  15. #endif
  16. SECTIONS
  17. {
  18. . = 0x00000000;
  19. _text = .; /* Text and read-only data */
  20. .text : {
  21. *(.text)
  22. SCHED_TEXT
  23. LOCK_TEXT
  24. KPROBES_TEXT
  25. *(.fixup)
  26. *(.gnu.warning)
  27. } = 0x0700
  28. _etext = .; /* End of text section */
  29. . = ALIGN(16); /* Exception table */
  30. __start___ex_table = .;
  31. __ex_table : { *(__ex_table) }
  32. __stop___ex_table = .;
  33. RODATA
  34. #ifdef CONFIG_SHARED_KERNEL
  35. . = ALIGN(1048576); /* VM shared segments are 1MB aligned */
  36. _eshared = .; /* End of shareable data */
  37. #endif
  38. .data : { /* Data */
  39. *(.data)
  40. CONSTRUCTORS
  41. }
  42. . = ALIGN(4096);
  43. __nosave_begin = .;
  44. .data_nosave : { *(.data.nosave) }
  45. . = ALIGN(4096);
  46. __nosave_end = .;
  47. . = ALIGN(4096);
  48. .data.page_aligned : { *(.data.idt) }
  49. . = ALIGN(256);
  50. .data.cacheline_aligned : { *(.data.cacheline_aligned) }
  51. . = ALIGN(256);
  52. .data.read_mostly : { *(.data.read_mostly) }
  53. _edata = .; /* End of data section */
  54. . = ALIGN(8192); /* init_task */
  55. .data.init_task : { *(.data.init_task) }
  56. /* will be freed after init */
  57. . = ALIGN(4096); /* Init code and data */
  58. __init_begin = .;
  59. .init.text : {
  60. _sinittext = .;
  61. *(.init.text)
  62. _einittext = .;
  63. }
  64. .init.data : { *(.init.data) }
  65. . = ALIGN(256);
  66. __setup_start = .;
  67. .init.setup : { *(.init.setup) }
  68. __setup_end = .;
  69. __initcall_start = .;
  70. .initcall.init : {
  71. *(.initcall1.init)
  72. *(.initcall2.init)
  73. *(.initcall3.init)
  74. *(.initcall4.init)
  75. *(.initcall5.init)
  76. *(.initcall6.init)
  77. *(.initcall7.init)
  78. }
  79. __initcall_end = .;
  80. __con_initcall_start = .;
  81. .con_initcall.init : { *(.con_initcall.init) }
  82. __con_initcall_end = .;
  83. SECURITY_INIT
  84. . = ALIGN(256);
  85. __initramfs_start = .;
  86. .init.ramfs : { *(.init.initramfs) }
  87. . = ALIGN(2);
  88. __initramfs_end = .;
  89. . = ALIGN(256);
  90. __per_cpu_start = .;
  91. .data.percpu : { *(.data.percpu) }
  92. __per_cpu_end = .;
  93. . = ALIGN(4096);
  94. __init_end = .;
  95. /* freed after init ends here */
  96. __bss_start = .; /* BSS */
  97. .bss : { *(.bss) }
  98. . = ALIGN(2);
  99. __bss_stop = .;
  100. _end = . ;
  101. /* Sections to be discarded */
  102. /DISCARD/ : {
  103. *(.exit.text) *(.exit.data) *(.exitcall.exit)
  104. }
  105. /* Stabs debugging sections. */
  106. .stab 0 : { *(.stab) }
  107. .stabstr 0 : { *(.stabstr) }
  108. .stab.excl 0 : { *(.stab.excl) }
  109. .stab.exclstr 0 : { *(.stab.exclstr) }
  110. .stab.index 0 : { *(.stab.index) }
  111. .stab.indexstr 0 : { *(.stab.indexstr) }
  112. .comment 0 : { *(.comment) }
  113. }