vmlinux.lds.S 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. #include <asm-generic/vmlinux.lds.h>
  3. #include <asm/vmlinux.lds.h>
  4. #include <asm/thread_info.h>
  5. #include <asm/page.h>
  6. #include <asm/sclp.h>
  7. #include "boot.h"
  8. OUTPUT_FORMAT("elf64-s390", "elf64-s390", "elf64-s390")
  9. OUTPUT_ARCH(s390:64-bit)
  10. ENTRY(startup)
  11. SECTIONS
  12. {
  13. . = 0;
  14. .ipldata : {
  15. *(.ipldata)
  16. }
  17. . = IPL_START;
  18. .head.text : {
  19. _head = . ;
  20. HEAD_TEXT
  21. _ehead = . ;
  22. }
  23. . = PARMAREA;
  24. .parmarea : {
  25. *(.parmarea)
  26. }
  27. .text : {
  28. _text = .; /* Text */
  29. *(.text)
  30. *(.text.*)
  31. _etext = . ;
  32. }
  33. .rodata : {
  34. _rodata = . ;
  35. *(.rodata) /* read-only data */
  36. *(.rodata.*)
  37. _erodata = . ;
  38. }
  39. NOTES
  40. .data : {
  41. _data = . ;
  42. *(.data)
  43. *(.data.*)
  44. _edata = . ;
  45. }
  46. BOOT_DATA
  47. BOOT_DATA_PRESERVED
  48. /*
  49. * This is the BSS section of the decompressor and not of the decompressed Linux kernel.
  50. * It will consume place in the decompressor's image.
  51. */
  52. . = ALIGN(8);
  53. .bss : {
  54. _bss = . ;
  55. *(.bss)
  56. *(.bss.*)
  57. *(COMMON)
  58. /*
  59. * Stacks for the decompressor
  60. */
  61. . = ALIGN(PAGE_SIZE);
  62. _dump_info_stack_start = .;
  63. . += PAGE_SIZE;
  64. _dump_info_stack_end = .;
  65. . = ALIGN(PAGE_SIZE);
  66. _stack_start = .;
  67. . += BOOT_STACK_SIZE;
  68. _stack_end = .;
  69. _ebss = .;
  70. }
  71. /*
  72. * uncompressed image info used by the decompressor it should match
  73. * struct vmlinux_info. It comes from .vmlinux.info section of
  74. * uncompressed vmlinux in a form of info.o
  75. */
  76. . = ALIGN(8);
  77. .vmlinux.info : {
  78. _vmlinux_info = .;
  79. *(.vmlinux.info)
  80. }
  81. .decompressor.syms : {
  82. . += 1; /* make sure we have \0 before the first entry */
  83. . = ALIGN(2);
  84. _decompressor_syms_start = .;
  85. *(.decompressor.syms)
  86. _decompressor_syms_end = .;
  87. }
  88. #ifdef CONFIG_KERNEL_UNCOMPRESSED
  89. . = 0x100000;
  90. #else
  91. . = ALIGN(8);
  92. #endif
  93. .rodata.compressed : {
  94. _compressed_start = .;
  95. *(.vmlinux.bin.compressed)
  96. _compressed_end = .;
  97. }
  98. #define SB_TRAILER_SIZE 32
  99. /* Trailer needed for Secure Boot */
  100. . += SB_TRAILER_SIZE; /* make sure .sb.trailer does not overwrite the previous section */
  101. . = ALIGN(4096) - SB_TRAILER_SIZE;
  102. .sb.trailer : {
  103. QUAD(0)
  104. QUAD(0)
  105. QUAD(0)
  106. QUAD(0x000000207a49504c)
  107. }
  108. _end = .;
  109. /* Sections to be discarded */
  110. /DISCARD/ : {
  111. *(.eh_frame)
  112. *(__ex_table)
  113. *(*__ksymtab*)
  114. *(___kcrctab*)
  115. }
  116. }