vmlinux.lds.S 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155
  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 <linux/config.h>
  6. #include <asm-generic/vmlinux.lds.h>
  7. #ifdef CONFIG_CPU_LITTLE_ENDIAN
  8. OUTPUT_FORMAT("elf32-sh-linux", "elf32-sh-linux", "elf32-sh-linux")
  9. #else
  10. OUTPUT_FORMAT("elf32-shbig-linux", "elf32-shbig-linux", "elf32-shbig-linux")
  11. #endif
  12. OUTPUT_ARCH(sh)
  13. ENTRY(_start)
  14. SECTIONS
  15. {
  16. . = 0x80000000 + CONFIG_MEMORY_START + CONFIG_ZERO_PAGE_OFFSET;
  17. _text = .; /* Text and read-only data */
  18. text = .; /* Text and read-only data */
  19. .empty_zero_page : {
  20. *(.empty_zero_page)
  21. } = 0
  22. .text : {
  23. *(.text)
  24. SCHED_TEXT
  25. LOCK_TEXT
  26. *(.fixup)
  27. *(.gnu.warning)
  28. } = 0x0009
  29. . = ALIGN(16); /* Exception table */
  30. __start___ex_table = .;
  31. __ex_table : { *(__ex_table) }
  32. __stop___ex_table = .;
  33. RODATA
  34. _etext = .; /* End of text section */
  35. .data : { /* Data */
  36. *(.data)
  37. /* Align the initial ramdisk image (INITRD) on page boundaries. */
  38. . = ALIGN(4096);
  39. __rd_start = .;
  40. *(.initrd)
  41. . = ALIGN(4096);
  42. __rd_end = .;
  43. CONSTRUCTORS
  44. }
  45. . = ALIGN(4096);
  46. .data.page_aligned : { *(.data.idt) }
  47. . = ALIGN(32);
  48. __per_cpu_start = .;
  49. .data.percpu : { *(.data.percpu) }
  50. __per_cpu_end = .;
  51. .data.cacheline_aligned : { *(.data.cacheline_aligned) }
  52. _edata = .; /* End of data section */
  53. . = ALIGN(8192); /* init_task */
  54. .data.init_task : { *(.data.init_task) }
  55. /* stack */
  56. .stack : { stack = .; _stack = .; }
  57. . = ALIGN(4096); /* Init code and data */
  58. __init_begin = .;
  59. _sinittext = .;
  60. .init.text : { *(.init.text) }
  61. _einittext = .;
  62. .init.data : { *(.init.data) }
  63. . = ALIGN(16);
  64. __setup_start = .;
  65. .init.setup : { *(.init.setup) }
  66. __setup_end = .;
  67. __initcall_start = .;
  68. .initcall.init : {
  69. *(.initcall1.init)
  70. *(.initcall2.init)
  71. *(.initcall3.init)
  72. *(.initcall4.init)
  73. *(.initcall5.init)
  74. *(.initcall6.init)
  75. *(.initcall7.init)
  76. }
  77. __initcall_end = .;
  78. __con_initcall_start = .;
  79. .con_initcall.init : { *(.con_initcall.init) }
  80. __con_initcall_end = .;
  81. SECURITY_INIT
  82. __initramfs_start = .;
  83. .init.ramfs : { *(.init.ramfs) }
  84. __initramfs_end = .;
  85. __machvec_start = .;
  86. .init.machvec : { *(.init.machvec) }
  87. __machvec_end = .;
  88. . = ALIGN(4096);
  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. *(.exit.text)
  102. *(.exit.data)
  103. *(.exitcall.exit)
  104. }
  105. /* Stabs debugging sections. */
  106. .stab 0 : { *(.stab) }
  107. .stabstr 0 : { *(.stabstr) }
  108. .stab.excl 0 : { *(.stab.excl) }
  109. .stab.exclstr 0 : { *(.stab.exclstr) }
  110. .stab.index 0 : { *(.stab.index) }
  111. .stab.indexstr 0 : { *(.stab.indexstr) }
  112. .comment 0 : { *(.comment) }
  113. /* DWARF debug sections.
  114. Symbols in the DWARF debugging section are relative to the beginning
  115. of the section so we begin .debug at 0. */
  116. /* DWARF 1 */
  117. .debug 0 : { *(.debug) }
  118. .line 0 : { *(.line) }
  119. /* GNU DWARF 1 extensions */
  120. .debug_srcinfo 0 : { *(.debug_srcinfo) }
  121. .debug_sfnames 0 : { *(.debug_sfnames) }
  122. /* DWARF 1.1 and DWARF 2 */
  123. .debug_aranges 0 : { *(.debug_aranges) }
  124. .debug_pubnames 0 : { *(.debug_pubnames) }
  125. /* DWARF 2 */
  126. .debug_info 0 : { *(.debug_info) }
  127. .debug_abbrev 0 : { *(.debug_abbrev) }
  128. .debug_line 0 : { *(.debug_line) }
  129. .debug_frame 0 : { *(.debug_frame) }
  130. .debug_str 0 : { *(.debug_str) }
  131. .debug_loc 0 : { *(.debug_loc) }
  132. .debug_macinfo 0 : { *(.debug_macinfo) }
  133. /* SGI/MIPS DWARF 2 extensions */
  134. .debug_weaknames 0 : { *(.debug_weaknames) }
  135. .debug_funcnames 0 : { *(.debug_funcnames) }
  136. .debug_typenames 0 : { *(.debug_typenames) }
  137. .debug_varnames 0 : { *(.debug_varnames) }
  138. /* These must appear regardless of . */
  139. }