vmlinux.lds.S 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135
  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. /* .exit.text is discarded at runtime, not link time, to deal with
  80. references from .rodata */
  81. .exit.text : { *(.exit.text) }
  82. .exit.data : { *(.exit.data) }
  83. #ifdef CONFIG_BLK_DEV_INITRD
  84. . = ALIGN(PAGE_SIZE);
  85. __initramfs_start = .;
  86. .init.ramfs : { *(.init.ramfs) }
  87. __initramfs_end = .;
  88. #endif
  89. . = ALIGN(4);
  90. __machvec_start = .;
  91. .machvec.init : { *(.machvec.init) }
  92. __machvec_end = .;
  93. . = ALIGN(PAGE_SIZE);
  94. .bss : {
  95. __init_end = .;
  96. __bss_start = .; /* BSS */
  97. *(.bss.page_aligned)
  98. *(.bss)
  99. . = ALIGN(4);
  100. _ebss = .; /* uClinux MTD sucks */
  101. _end = . ;
  102. }
  103. /* When something in the kernel is NOT compiled as a module, the
  104. * module cleanup code and data are put into these segments. Both
  105. * can then be thrown away, as cleanup code is never called unless
  106. * it's a module.
  107. */
  108. /DISCARD/ : {
  109. *(.exitcall.exit)
  110. }
  111. STABS_DEBUG
  112. DWARF_DEBUG
  113. }