vmlinux.lds.S 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152
  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. . = CONFIG_PAGE_OFFSET + 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. . = ALIGN(4096); /* 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. *(.initcall1.init)
  67. *(.initcall2.init)
  68. *(.initcall3.init)
  69. *(.initcall4.init)
  70. *(.initcall5.init)
  71. *(.initcall6.init)
  72. *(.initcall7.init)
  73. }
  74. __initcall_end = .;
  75. __con_initcall_start = .;
  76. .con_initcall.init : { *(.con_initcall.init) }
  77. __con_initcall_end = .;
  78. SECURITY_INIT
  79. __initramfs_start = .;
  80. .init.ramfs : { *(.init.ramfs) }
  81. __initramfs_end = .;
  82. __machvec_start = .;
  83. .init.machvec : { *(.init.machvec) }
  84. __machvec_end = .;
  85. . = ALIGN(4096);
  86. __init_end = .;
  87. . = ALIGN(4);
  88. __bss_start = .; /* BSS */
  89. .bss : { *(.bss) }
  90. . = ALIGN(4);
  91. _end = . ;
  92. /* When something in the kernel is NOT compiled as a module, the
  93. * module cleanup code and data are put into these segments. Both
  94. * can then be thrown away, as cleanup code is never called unless
  95. * it's a module.
  96. */
  97. /DISCARD/ : {
  98. *(.exit.text)
  99. *(.exit.data)
  100. *(.exitcall.exit)
  101. }
  102. /* Stabs debugging sections. */
  103. .stab 0 : { *(.stab) }
  104. .stabstr 0 : { *(.stabstr) }
  105. .stab.excl 0 : { *(.stab.excl) }
  106. .stab.exclstr 0 : { *(.stab.exclstr) }
  107. .stab.index 0 : { *(.stab.index) }
  108. .stab.indexstr 0 : { *(.stab.indexstr) }
  109. .comment 0 : { *(.comment) }
  110. /* DWARF debug sections.
  111. Symbols in the DWARF debugging section are relative to the beginning
  112. of the section so we begin .debug at 0. */
  113. /* DWARF 1 */
  114. .debug 0 : { *(.debug) }
  115. .line 0 : { *(.line) }
  116. /* GNU DWARF 1 extensions */
  117. .debug_srcinfo 0 : { *(.debug_srcinfo) }
  118. .debug_sfnames 0 : { *(.debug_sfnames) }
  119. /* DWARF 1.1 and DWARF 2 */
  120. .debug_aranges 0 : { *(.debug_aranges) }
  121. .debug_pubnames 0 : { *(.debug_pubnames) }
  122. /* DWARF 2 */
  123. .debug_info 0 : { *(.debug_info) }
  124. .debug_abbrev 0 : { *(.debug_abbrev) }
  125. .debug_line 0 : { *(.debug_line) }
  126. .debug_frame 0 : { *(.debug_frame) }
  127. .debug_str 0 : { *(.debug_str) }
  128. .debug_loc 0 : { *(.debug_loc) }
  129. .debug_macinfo 0 : { *(.debug_macinfo) }
  130. /* SGI/MIPS DWARF 2 extensions */
  131. .debug_weaknames 0 : { *(.debug_weaknames) }
  132. .debug_funcnames 0 : { *(.debug_funcnames) }
  133. .debug_typenames 0 : { *(.debug_typenames) }
  134. .debug_varnames 0 : { *(.debug_varnames) }
  135. /* These must appear regardless of . */
  136. }