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