vmlinux.lds.S 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125
  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. .data.cacheline_aligned : { *(.data.cacheline_aligned) }
  56. _edata = .; /* End of data section */
  57. . = ALIGN(THREAD_SIZE); /* init_task */
  58. .data.init_task : { *(.data.init_task) }
  59. . = ALIGN(PAGE_SIZE); /* Init code and data */
  60. __init_begin = .;
  61. _sinittext = .;
  62. .init.text : { *(.init.text) }
  63. _einittext = .;
  64. .init.data : { *(.init.data) }
  65. . = ALIGN(16);
  66. __setup_start = .;
  67. .init.setup : { *(.init.setup) }
  68. __setup_end = .;
  69. __initcall_start = .;
  70. .initcall.init : {
  71. INITCALLS
  72. }
  73. __initcall_end = .;
  74. __con_initcall_start = .;
  75. .con_initcall.init : { *(.con_initcall.init) }
  76. __con_initcall_end = .;
  77. SECURITY_INIT
  78. #ifdef CONFIG_BLK_DEV_INITRD
  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. _end = . ;
  95. }
  96. /* When something in the kernel is NOT compiled as a module, the
  97. * module cleanup code and data are put into these segments. Both
  98. * can then be thrown away, as cleanup code is never called unless
  99. * it's a module.
  100. */
  101. /DISCARD/ : {
  102. *(.exitcall.exit)
  103. }
  104. STABS_DEBUG
  105. DWARF_DEBUG
  106. }