vmlinux.lds.S 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  1. /* ld script to make s390 Linux kernel
  2. * Written by Martin Schwidefsky (schwidefsky@de.ibm.com)
  3. */
  4. #include <asm/thread_info.h>
  5. #include <asm/page.h>
  6. /*
  7. * Put .bss..swapper_pg_dir as the first thing in .bss. This will
  8. * make sure it has 16k alignment.
  9. */
  10. #define BSS_FIRST_SECTIONS *(.bss..swapper_pg_dir)
  11. /* Handle ro_after_init data on our own. */
  12. #define RO_AFTER_INIT_DATA
  13. #include <asm-generic/vmlinux.lds.h>
  14. OUTPUT_FORMAT("elf64-s390", "elf64-s390", "elf64-s390")
  15. OUTPUT_ARCH(s390:64-bit)
  16. ENTRY(startup)
  17. jiffies = jiffies_64;
  18. PHDRS {
  19. text PT_LOAD FLAGS(5); /* R_E */
  20. data PT_LOAD FLAGS(7); /* RWE */
  21. note PT_NOTE FLAGS(0); /* ___ */
  22. }
  23. SECTIONS
  24. {
  25. . = 0x00000000;
  26. .text : {
  27. _text = .; /* Text and read-only data */
  28. HEAD_TEXT
  29. TEXT_TEXT
  30. SCHED_TEXT
  31. CPUIDLE_TEXT
  32. LOCK_TEXT
  33. KPROBES_TEXT
  34. IRQENTRY_TEXT
  35. SOFTIRQENTRY_TEXT
  36. *(.fixup)
  37. *(.gnu.warning)
  38. } :text = 0x0700
  39. _etext = .; /* End of text section */
  40. NOTES :text :note
  41. .dummy : { *(.dummy) } :data
  42. RO_DATA_SECTION(PAGE_SIZE)
  43. #ifdef CONFIG_SHARED_KERNEL
  44. . = ALIGN(0x100000); /* VM shared segments are 1MB aligned */
  45. #endif
  46. . = ALIGN(PAGE_SIZE);
  47. _eshared = .; /* End of shareable data */
  48. _sdata = .; /* Start of data section */
  49. . = ALIGN(PAGE_SIZE);
  50. __start_ro_after_init = .;
  51. __start_data_ro_after_init = .;
  52. .data..ro_after_init : {
  53. *(.data..ro_after_init)
  54. }
  55. __end_data_ro_after_init = .;
  56. EXCEPTION_TABLE(16)
  57. . = ALIGN(PAGE_SIZE);
  58. __end_ro_after_init = .;
  59. RW_DATA_SECTION(0x100, PAGE_SIZE, THREAD_SIZE)
  60. _edata = .; /* End of data section */
  61. /* will be freed after init */
  62. . = ALIGN(PAGE_SIZE); /* Init code and data */
  63. __init_begin = .;
  64. INIT_TEXT_SECTION(PAGE_SIZE)
  65. /*
  66. * .exit.text is discarded at runtime, not link time,
  67. * to deal with references from __bug_table
  68. */
  69. .exit.text : {
  70. EXIT_TEXT
  71. }
  72. .exit.data : {
  73. EXIT_DATA
  74. }
  75. /* early.c uses stsi, which requires page aligned data. */
  76. . = ALIGN(PAGE_SIZE);
  77. INIT_DATA_SECTION(0x100)
  78. PERCPU_SECTION(0x100)
  79. . = ALIGN(PAGE_SIZE);
  80. __init_end = .; /* freed after init ends here */
  81. BSS_SECTION(PAGE_SIZE, 4 * PAGE_SIZE, PAGE_SIZE)
  82. _end = . ;
  83. /* Debugging sections. */
  84. STABS_DEBUG
  85. DWARF_DEBUG
  86. /* Sections to be discarded */
  87. DISCARDS
  88. }