vmlinux.lds.S 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  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. #include <asm-generic/vmlinux.lds.h>
  7. #ifndef CONFIG_64BIT
  8. OUTPUT_FORMAT("elf32-s390", "elf32-s390", "elf32-s390")
  9. OUTPUT_ARCH(s390:31-bit)
  10. ENTRY(startup)
  11. jiffies = jiffies_64 + 4;
  12. #else
  13. OUTPUT_FORMAT("elf64-s390", "elf64-s390", "elf64-s390")
  14. OUTPUT_ARCH(s390:64-bit)
  15. ENTRY(startup)
  16. jiffies = jiffies_64;
  17. #endif
  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. LOCK_TEXT
  32. KPROBES_TEXT
  33. IRQENTRY_TEXT
  34. *(.fixup)
  35. *(.gnu.warning)
  36. } :text = 0x0700
  37. _etext = .; /* End of text section */
  38. NOTES :text :note
  39. .dummy : { *(.dummy) } :data
  40. RODATA
  41. #ifdef CONFIG_SHARED_KERNEL
  42. . = ALIGN(0x100000); /* VM shared segments are 1MB aligned */
  43. #endif
  44. . = ALIGN(PAGE_SIZE);
  45. _eshared = .; /* End of shareable data */
  46. _sdata = .; /* Start of data section */
  47. EXCEPTION_TABLE(16) :data
  48. RW_DATA_SECTION(0x100, PAGE_SIZE, THREAD_SIZE)
  49. _edata = .; /* End of data section */
  50. /* will be freed after init */
  51. . = ALIGN(PAGE_SIZE); /* Init code and data */
  52. __init_begin = .;
  53. INIT_TEXT_SECTION(PAGE_SIZE)
  54. /*
  55. * .exit.text is discarded at runtime, not link time,
  56. * to deal with references from __bug_table
  57. */
  58. .exit.text : {
  59. EXIT_TEXT
  60. }
  61. /* early.c uses stsi, which requires page aligned data. */
  62. . = ALIGN(PAGE_SIZE);
  63. INIT_DATA_SECTION(0x100)
  64. PERCPU_SECTION(0x100)
  65. . = ALIGN(PAGE_SIZE);
  66. __init_end = .; /* freed after init ends here */
  67. BSS_SECTION(0, 2, 0)
  68. _end = . ;
  69. /* Debugging sections. */
  70. STABS_DEBUG
  71. DWARF_DEBUG
  72. /* Sections to be discarded */
  73. DISCARDS
  74. }