vmlinux.lds.S 2.7 KB

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