vmlinux.lds.S 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131
  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. *(.fixup)
  25. *(.gnu.warning)
  26. } = 0x0700
  27. _etext = .; /* End of text section */
  28. . = ALIGN(16); /* Exception table */
  29. __start___ex_table = .;
  30. __ex_table : { *(__ex_table) }
  31. __stop___ex_table = .;
  32. RODATA
  33. #ifdef CONFIG_SHARED_KERNEL
  34. . = ALIGN(1048576); /* VM shared segments are 1MB aligned */
  35. _eshared = .; /* End of shareable data */
  36. #endif
  37. .data : { /* Data */
  38. *(.data)
  39. CONSTRUCTORS
  40. }
  41. . = ALIGN(4096);
  42. __nosave_begin = .;
  43. .data_nosave : { *(.data.nosave) }
  44. . = ALIGN(4096);
  45. __nosave_end = .;
  46. . = ALIGN(4096);
  47. .data.page_aligned : { *(.data.idt) }
  48. . = ALIGN(256);
  49. .data.cacheline_aligned : { *(.data.cacheline_aligned) }
  50. . = ALIGN(256);
  51. .data.read_mostly : { *(.data.read_mostly) }
  52. _edata = .; /* End of data section */
  53. . = ALIGN(8192); /* init_task */
  54. .data.init_task : { *(.data.init_task) }
  55. /* will be freed after init */
  56. . = ALIGN(4096); /* Init code and data */
  57. __init_begin = .;
  58. .init.text : {
  59. _sinittext = .;
  60. *(.init.text)
  61. _einittext = .;
  62. }
  63. .init.data : { *(.init.data) }
  64. . = ALIGN(256);
  65. __setup_start = .;
  66. .init.setup : { *(.init.setup) }
  67. __setup_end = .;
  68. __initcall_start = .;
  69. .initcall.init : {
  70. *(.initcall1.init)
  71. *(.initcall2.init)
  72. *(.initcall3.init)
  73. *(.initcall4.init)
  74. *(.initcall5.init)
  75. *(.initcall6.init)
  76. *(.initcall7.init)
  77. }
  78. __initcall_end = .;
  79. __con_initcall_start = .;
  80. .con_initcall.init : { *(.con_initcall.init) }
  81. __con_initcall_end = .;
  82. SECURITY_INIT
  83. . = ALIGN(256);
  84. __initramfs_start = .;
  85. .init.ramfs : { *(.init.initramfs) }
  86. . = ALIGN(2);
  87. __initramfs_end = .;
  88. . = ALIGN(256);
  89. __per_cpu_start = .;
  90. .data.percpu : { *(.data.percpu) }
  91. __per_cpu_end = .;
  92. . = ALIGN(4096);
  93. __init_end = .;
  94. /* freed after init ends here */
  95. __bss_start = .; /* BSS */
  96. .bss : { *(.bss) }
  97. . = ALIGN(2);
  98. __bss_stop = .;
  99. _end = . ;
  100. /* Sections to be discarded */
  101. /DISCARD/ : {
  102. *(.exitcall.exit)
  103. }
  104. /* Stabs debugging sections. */
  105. .stab 0 : { *(.stab) }
  106. .stabstr 0 : { *(.stabstr) }
  107. .stab.excl 0 : { *(.stab.excl) }
  108. .stab.exclstr 0 : { *(.stab.exclstr) }
  109. .stab.index 0 : { *(.stab.index) }
  110. .stab.indexstr 0 : { *(.stab.indexstr) }
  111. .comment 0 : { *(.comment) }
  112. }