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. #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. 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. .data : { /* Data */
  40. *(.data)
  41. CONSTRUCTORS
  42. }
  43. . = ALIGN(4096);
  44. __nosave_begin = .;
  45. .data_nosave : { *(.data.nosave) }
  46. . = ALIGN(4096);
  47. __nosave_end = .;
  48. . = ALIGN(4096);
  49. .data.page_aligned : { *(.data.idt) }
  50. . = ALIGN(256);
  51. .data.cacheline_aligned : { *(.data.cacheline_aligned) }
  52. . = ALIGN(256);
  53. .data.read_mostly : { *(.data.read_mostly) }
  54. _edata = .; /* End of data section */
  55. . = ALIGN(8192); /* init_task */
  56. .data.init_task : { *(.data.init_task) }
  57. /* will be freed after init */
  58. . = ALIGN(4096); /* Init code and data */
  59. __init_begin = .;
  60. .init.text : {
  61. _sinittext = .;
  62. *(.init.text)
  63. _einittext = .;
  64. }
  65. .init.data : { *(.init.data) }
  66. . = ALIGN(256);
  67. __setup_start = .;
  68. .init.setup : { *(.init.setup) }
  69. __setup_end = .;
  70. __initcall_start = .;
  71. .initcall.init : {
  72. INITCALLS
  73. }
  74. __initcall_end = .;
  75. __con_initcall_start = .;
  76. .con_initcall.init : { *(.con_initcall.init) }
  77. __con_initcall_end = .;
  78. SECURITY_INIT
  79. #ifdef CONFIG_BLK_DEV_INITRD
  80. . = ALIGN(256);
  81. __initramfs_start = .;
  82. .init.ramfs : { *(.init.initramfs) }
  83. . = ALIGN(2);
  84. __initramfs_end = .;
  85. #endif
  86. . = ALIGN(256);
  87. __per_cpu_start = .;
  88. .data.percpu : { *(.data.percpu) }
  89. __per_cpu_end = .;
  90. . = ALIGN(4096);
  91. __init_end = .;
  92. /* freed after init ends here */
  93. __bss_start = .; /* BSS */
  94. .bss : { *(.bss) }
  95. . = ALIGN(2);
  96. __bss_stop = .;
  97. _end = . ;
  98. /* Sections to be discarded */
  99. /DISCARD/ : {
  100. *(.exit.text) *(.exit.data) *(.exitcall.exit)
  101. }
  102. /* Stabs debugging sections. */
  103. .stab 0 : { *(.stab) }
  104. .stabstr 0 : { *(.stabstr) }
  105. .stab.excl 0 : { *(.stab.excl) }
  106. .stab.exclstr 0 : { *(.stab.exclstr) }
  107. .stab.index 0 : { *(.stab.index) }
  108. .stab.indexstr 0 : { *(.stab.indexstr) }
  109. .comment 0 : { *(.comment) }
  110. }