vmlinux.lds.S 3.9 KB

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