vmlinux.lds.S 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  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. OUTPUT_FORMAT("elf64-s390", "elf64-s390", "elf64-s390")
  8. OUTPUT_ARCH(s390:64-bit)
  9. ENTRY(startup)
  10. jiffies = jiffies_64;
  11. PHDRS {
  12. text PT_LOAD FLAGS(5); /* R_E */
  13. data PT_LOAD FLAGS(7); /* RWE */
  14. note PT_NOTE FLAGS(0); /* ___ */
  15. }
  16. SECTIONS
  17. {
  18. . = 0x00000000;
  19. .text : {
  20. _text = .; /* Text and read-only data */
  21. HEAD_TEXT
  22. TEXT_TEXT
  23. SCHED_TEXT
  24. LOCK_TEXT
  25. KPROBES_TEXT
  26. IRQENTRY_TEXT
  27. *(.fixup)
  28. *(.gnu.warning)
  29. } :text = 0x0700
  30. _etext = .; /* End of text section */
  31. NOTES :text :note
  32. .dummy : { *(.dummy) } :data
  33. RO_DATA_SECTION(PAGE_SIZE)
  34. #ifdef CONFIG_SHARED_KERNEL
  35. . = ALIGN(0x100000); /* VM shared segments are 1MB aligned */
  36. #endif
  37. . = ALIGN(PAGE_SIZE);
  38. _eshared = .; /* End of shareable data */
  39. _sdata = .; /* Start of data section */
  40. EXCEPTION_TABLE(16) :data
  41. RW_DATA_SECTION(0x100, PAGE_SIZE, THREAD_SIZE)
  42. _edata = .; /* End of data section */
  43. /* will be freed after init */
  44. . = ALIGN(PAGE_SIZE); /* Init code and data */
  45. __init_begin = .;
  46. INIT_TEXT_SECTION(PAGE_SIZE)
  47. /*
  48. * .exit.text is discarded at runtime, not link time,
  49. * to deal with references from __bug_table
  50. */
  51. .exit.text : {
  52. EXIT_TEXT
  53. }
  54. .exit.data : {
  55. EXIT_DATA
  56. }
  57. /* early.c uses stsi, which requires page aligned data. */
  58. . = ALIGN(PAGE_SIZE);
  59. INIT_DATA_SECTION(0x100)
  60. PERCPU_SECTION(0x100)
  61. . = ALIGN(PAGE_SIZE);
  62. __init_end = .; /* freed after init ends here */
  63. BSS_SECTION(0, 2, 0)
  64. _end = . ;
  65. /* Debugging sections. */
  66. STABS_DEBUG
  67. DWARF_DEBUG
  68. /* Sections to be discarded */
  69. DISCARDS
  70. }