vmlinux.lds.S 2.8 KB

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