vmlinux.lds.S 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130
  1. /* $Id: vmlinux.lds.S,v 1.8 2003/05/16 17:18:14 lethal Exp $
  2. * ld script to make SuperH Linux kernel
  3. * Written by Niibe Yutaka
  4. */
  5. #include <asm/thread_info.h>
  6. #include <asm/cache.h>
  7. #include <asm-generic/vmlinux.lds.h>
  8. #ifdef CONFIG_CPU_LITTLE_ENDIAN
  9. OUTPUT_FORMAT("elf32-sh-linux", "elf32-sh-linux", "elf32-sh-linux")
  10. #else
  11. OUTPUT_FORMAT("elf32-shbig-linux", "elf32-shbig-linux", "elf32-shbig-linux")
  12. #endif
  13. OUTPUT_ARCH(sh)
  14. ENTRY(_start)
  15. SECTIONS
  16. {
  17. . = CONFIG_PAGE_OFFSET + CONFIG_MEMORY_START + CONFIG_ZERO_PAGE_OFFSET;
  18. _text = .; /* Text and read-only data */
  19. text = .; /* Text and read-only data */
  20. .empty_zero_page : {
  21. *(.empty_zero_page)
  22. } = 0
  23. .text : {
  24. *(.text.head)
  25. TEXT_TEXT
  26. SCHED_TEXT
  27. LOCK_TEXT
  28. *(.fixup)
  29. *(.gnu.warning)
  30. } = 0x0009
  31. . = ALIGN(16); /* Exception table */
  32. __start___ex_table = .;
  33. __ex_table : { *(__ex_table) }
  34. __stop___ex_table = .;
  35. _etext = .; /* End of text section */
  36. RODATA
  37. BUG_TABLE
  38. .data : { /* Data */
  39. DATA_DATA
  40. /* Align the initial ramdisk image (INITRD) on page boundaries. */
  41. . = ALIGN(PAGE_SIZE);
  42. __rd_start = .;
  43. *(.initrd)
  44. . = ALIGN(PAGE_SIZE);
  45. __rd_end = .;
  46. CONSTRUCTORS
  47. }
  48. . = ALIGN(PAGE_SIZE);
  49. .data.page_aligned : { *(.data.page_aligned) }
  50. __nosave_begin = .;
  51. .data_nosave : { *(.data.nosave) }
  52. . = ALIGN(PAGE_SIZE);
  53. __nosave_end = .;
  54. PERCPU(PAGE_SIZE)
  55. . = ALIGN(L1_CACHE_BYTES);
  56. .data.cacheline_aligned : { *(.data.cacheline_aligned) }
  57. _edata = .; /* End of data section */
  58. . = ALIGN(THREAD_SIZE); /* init_task */
  59. .data.init_task : { *(.data.init_task) }
  60. . = ALIGN(PAGE_SIZE); /* Init code and data */
  61. __init_begin = .;
  62. _sinittext = .;
  63. .init.text : { *(.init.text) }
  64. _einittext = .;
  65. .init.data : { *(.init.data) }
  66. . = ALIGN(16);
  67. __setup_start = .;
  68. .init.setup : { *(.init.setup) }
  69. __setup_end = .;
  70. __initcall_start = .;
  71. .initcall.init : {
  72. INITCALLS
  73. }
  74. __initcall_end = .;
  75. __con_initcall_start = .;
  76. .con_initcall.init : { *(.con_initcall.init) }
  77. __con_initcall_end = .;
  78. SECURITY_INIT
  79. #ifdef CONFIG_BLK_DEV_INITRD
  80. . = ALIGN(PAGE_SIZE);
  81. __initramfs_start = .;
  82. .init.ramfs : { *(.init.ramfs) }
  83. __initramfs_end = .;
  84. #endif
  85. . = ALIGN(4);
  86. __machvec_start = .;
  87. .machvec.init : { *(.machvec.init) }
  88. __machvec_end = .;
  89. . = ALIGN(PAGE_SIZE);
  90. .bss : {
  91. __init_end = .;
  92. __bss_start = .; /* BSS */
  93. *(.bss.page_aligned)
  94. *(.bss)
  95. . = ALIGN(4);
  96. _ebss = .; /* uClinux MTD sucks */
  97. _end = . ;
  98. }
  99. /* When something in the kernel is NOT compiled as a module, the
  100. * module cleanup code and data are put into these segments. Both
  101. * can then be thrown away, as cleanup code is never called unless
  102. * it's a module.
  103. */
  104. /DISCARD/ : {
  105. *(.exitcall.exit)
  106. }
  107. STABS_DEBUG
  108. DWARF_DEBUG
  109. }