vmlinux.lds.S 2.7 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)
  25. SCHED_TEXT
  26. LOCK_TEXT
  27. *(.fixup)
  28. *(.gnu.warning)
  29. } = 0x0009
  30. . = ALIGN(16); /* Exception table */
  31. __start___ex_table = .;
  32. __ex_table : { *(__ex_table) }
  33. __stop___ex_table = .;
  34. _etext = .; /* End of text section */
  35. RODATA
  36. BUG_TABLE
  37. .data : { /* Data */
  38. *(.data)
  39. /* Align the initial ramdisk image (INITRD) on page boundaries. */
  40. . = ALIGN(PAGE_SIZE);
  41. __rd_start = .;
  42. *(.initrd)
  43. . = ALIGN(PAGE_SIZE);
  44. __rd_end = .;
  45. CONSTRUCTORS
  46. }
  47. . = ALIGN(PAGE_SIZE);
  48. .data.page_aligned : { *(.data.page_aligned) }
  49. __nosave_begin = .;
  50. .data_nosave : { *(.data.nosave) }
  51. . = ALIGN(PAGE_SIZE);
  52. __nosave_end = .;
  53. . = ALIGN(PAGE_SIZE);
  54. __per_cpu_start = .;
  55. .data.percpu : { *(.data.percpu) }
  56. __per_cpu_end = .;
  57. .data.cacheline_aligned : { *(.data.cacheline_aligned) }
  58. _edata = .; /* End of data section */
  59. . = ALIGN(THREAD_SIZE); /* init_task */
  60. .data.init_task : { *(.data.init_task) }
  61. . = ALIGN(PAGE_SIZE); /* Init code and data */
  62. __init_begin = .;
  63. _sinittext = .;
  64. .init.text : { *(.init.text) }
  65. _einittext = .;
  66. .init.data : { *(.init.data) }
  67. . = ALIGN(16);
  68. __setup_start = .;
  69. .init.setup : { *(.init.setup) }
  70. __setup_end = .;
  71. __initcall_start = .;
  72. .initcall.init : {
  73. INITCALLS
  74. }
  75. __initcall_end = .;
  76. __con_initcall_start = .;
  77. .con_initcall.init : { *(.con_initcall.init) }
  78. __con_initcall_end = .;
  79. SECURITY_INIT
  80. #ifdef CONFIG_BLK_DEV_INITRD
  81. __initramfs_start = .;
  82. .init.ramfs : { *(.init.ramfs) }
  83. __initramfs_end = .;
  84. #endif
  85. __machvec_start = .;
  86. .init.machvec : { *(.init.machvec) }
  87. __machvec_end = .;
  88. . = ALIGN(PAGE_SIZE);
  89. __init_end = .;
  90. . = ALIGN(4);
  91. __bss_start = .; /* BSS */
  92. .bss : { *(.bss) }
  93. . = ALIGN(4);
  94. _end = . ;
  95. /* When something in the kernel is NOT compiled as a module, the
  96. * module cleanup code and data are put into these segments. Both
  97. * can then be thrown away, as cleanup code is never called unless
  98. * it's a module.
  99. */
  100. /DISCARD/ : {
  101. *(.exitcall.exit)
  102. }
  103. STABS_DEBUG
  104. DWARF_DEBUG
  105. }