vmlinux.lds.S 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127
  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. CONSTRUCTORS
  41. }
  42. . = ALIGN(PAGE_SIZE);
  43. .data.page_aligned : { *(.data.page_aligned) }
  44. __nosave_begin = .;
  45. .data_nosave : { *(.data.nosave) }
  46. . = ALIGN(PAGE_SIZE);
  47. __nosave_end = .;
  48. PERCPU(PAGE_SIZE)
  49. . = ALIGN(L1_CACHE_BYTES);
  50. .data.cacheline_aligned : { *(.data.cacheline_aligned) }
  51. _edata = .; /* End of data section */
  52. . = ALIGN(THREAD_SIZE); /* init_task */
  53. .data.init_task : { *(.data.init_task) }
  54. . = ALIGN(PAGE_SIZE); /* Init code and data */
  55. __init_begin = .;
  56. _sinittext = .;
  57. .init.text : { *(.init.text) }
  58. _einittext = .;
  59. .init.data : { *(.init.data) }
  60. . = ALIGN(16);
  61. __setup_start = .;
  62. .init.setup : { *(.init.setup) }
  63. __setup_end = .;
  64. __initcall_start = .;
  65. .initcall.init : {
  66. INITCALLS
  67. }
  68. __initcall_end = .;
  69. __con_initcall_start = .;
  70. .con_initcall.init : { *(.con_initcall.init) }
  71. __con_initcall_end = .;
  72. SECURITY_INIT
  73. /* .exit.text is discarded at runtime, not link time, to deal with
  74. references from .rodata */
  75. .exit.text : { *(.exit.text) }
  76. .exit.data : { *(.exit.data) }
  77. #ifdef CONFIG_BLK_DEV_INITRD
  78. . = ALIGN(PAGE_SIZE);
  79. __initramfs_start = .;
  80. .init.ramfs : { *(.init.ramfs) }
  81. __initramfs_end = .;
  82. #endif
  83. . = ALIGN(4);
  84. __machvec_start = .;
  85. .machvec.init : { *(.machvec.init) }
  86. __machvec_end = .;
  87. . = ALIGN(PAGE_SIZE);
  88. .bss : {
  89. __init_end = .;
  90. __bss_start = .; /* BSS */
  91. *(.bss.page_aligned)
  92. *(.bss)
  93. . = ALIGN(4);
  94. _ebss = .; /* uClinux MTD sucks */
  95. _end = . ;
  96. }
  97. /* When something in the kernel is NOT compiled as a module, the
  98. * module cleanup code and data are put into these segments. Both
  99. * can then be thrown away, as cleanup code is never called unless
  100. * it's a module.
  101. */
  102. /DISCARD/ : {
  103. *(.exitcall.exit)
  104. }
  105. STABS_DEBUG
  106. DWARF_DEBUG
  107. }