vmlinux.lds.S 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130
  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. #include <linux/config.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 = .; /* Text and read-only data */
  21. .text : {
  22. *(.text)
  23. SCHED_TEXT
  24. LOCK_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(32);
  50. .data.cacheline_aligned : { *(.data.cacheline_aligned) }
  51. _edata = .; /* End of data section */
  52. . = ALIGN(8192); /* init_task */
  53. .data.init_task : { *(.data.init_task) }
  54. /* will be freed after init */
  55. . = ALIGN(4096); /* Init code and data */
  56. __init_begin = .;
  57. .init.text : {
  58. _sinittext = .;
  59. *(.init.text)
  60. _einittext = .;
  61. }
  62. .init.data : { *(.init.data) }
  63. . = ALIGN(256);
  64. __setup_start = .;
  65. .init.setup : { *(.init.setup) }
  66. __setup_end = .;
  67. __initcall_start = .;
  68. .initcall.init : {
  69. *(.initcall1.init)
  70. *(.initcall2.init)
  71. *(.initcall3.init)
  72. *(.initcall4.init)
  73. *(.initcall5.init)
  74. *(.initcall6.init)
  75. *(.initcall7.init)
  76. }
  77. __initcall_end = .;
  78. __con_initcall_start = .;
  79. .con_initcall.init : { *(.con_initcall.init) }
  80. __con_initcall_end = .;
  81. SECURITY_INIT
  82. . = ALIGN(256);
  83. __initramfs_start = .;
  84. .init.ramfs : { *(.init.initramfs) }
  85. . = ALIGN(2);
  86. __initramfs_end = .;
  87. . = ALIGN(256);
  88. __per_cpu_start = .;
  89. .data.percpu : { *(.data.percpu) }
  90. __per_cpu_end = .;
  91. . = ALIGN(4096);
  92. __init_end = .;
  93. /* freed after init ends here */
  94. __bss_start = .; /* BSS */
  95. .bss : { *(.bss) }
  96. . = ALIGN(2);
  97. __bss_stop = .;
  98. _end = . ;
  99. /* Sections to be discarded */
  100. /DISCARD/ : {
  101. *(.exitcall.exit)
  102. }
  103. /* Stabs debugging sections. */
  104. .stab 0 : { *(.stab) }
  105. .stabstr 0 : { *(.stabstr) }
  106. .stab.excl 0 : { *(.stab.excl) }
  107. .stab.exclstr 0 : { *(.stab.exclstr) }
  108. .stab.index 0 : { *(.stab.index) }
  109. .stab.indexstr 0 : { *(.stab.indexstr) }
  110. .comment 0 : { *(.comment) }
  111. }