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/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. RODATA
  35. _etext = .; /* End of text section */
  36. .data : { /* Data */
  37. *(.data)
  38. /* Align the initial ramdisk image (INITRD) on page boundaries. */
  39. . = ALIGN(PAGE_SIZE);
  40. __rd_start = .;
  41. *(.initrd)
  42. . = ALIGN(PAGE_SIZE);
  43. __rd_end = .;
  44. CONSTRUCTORS
  45. }
  46. . = ALIGN(PAGE_SIZE);
  47. .data.page_aligned : { *(.data.page_aligned) }
  48. . = ALIGN(L1_CACHE_BYTES);
  49. __per_cpu_start = .;
  50. .data.percpu : { *(.data.percpu) }
  51. __per_cpu_end = .;
  52. .data.cacheline_aligned : { *(.data.cacheline_aligned) }
  53. _edata = .; /* End of data section */
  54. . = ALIGN(THREAD_SIZE); /* init_task */
  55. .data.init_task : { *(.data.init_task) }
  56. . = ALIGN(PAGE_SIZE); /* 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. INITCALLS
  69. }
  70. __initcall_end = .;
  71. __con_initcall_start = .;
  72. .con_initcall.init : { *(.con_initcall.init) }
  73. __con_initcall_end = .;
  74. SECURITY_INIT
  75. #ifdef CONFIG_BLK_DEV_INITRD
  76. __initramfs_start = .;
  77. .init.ramfs : { *(.init.ramfs) }
  78. __initramfs_end = .;
  79. #endif
  80. __machvec_start = .;
  81. .init.machvec : { *(.init.machvec) }
  82. __machvec_end = .;
  83. . = ALIGN(PAGE_SIZE);
  84. __init_end = .;
  85. . = ALIGN(4);
  86. __bss_start = .; /* BSS */
  87. .bss : { *(.bss) }
  88. . = ALIGN(4);
  89. _end = . ;
  90. /* When something in the kernel is NOT compiled as a module, the
  91. * module cleanup code and data are put into these segments. Both
  92. * can then be thrown away, as cleanup code is never called unless
  93. * it's a module.
  94. */
  95. /DISCARD/ : {
  96. *(.exit.text)
  97. *(.exit.data)
  98. *(.exitcall.exit)
  99. }
  100. /* Stabs debugging sections. */
  101. .stab 0 : { *(.stab) }
  102. .stabstr 0 : { *(.stabstr) }
  103. .stab.excl 0 : { *(.stab.excl) }
  104. .stab.exclstr 0 : { *(.stab.exclstr) }
  105. .stab.index 0 : { *(.stab.index) }
  106. .stab.indexstr 0 : { *(.stab.indexstr) }
  107. .comment 0 : { *(.comment) }
  108. /* DWARF debug sections.
  109. Symbols in the DWARF debugging section are relative to the beginning
  110. of the section so we begin .debug at 0. */
  111. /* DWARF 1 */
  112. .debug 0 : { *(.debug) }
  113. .line 0 : { *(.line) }
  114. /* GNU DWARF 1 extensions */
  115. .debug_srcinfo 0 : { *(.debug_srcinfo) }
  116. .debug_sfnames 0 : { *(.debug_sfnames) }
  117. /* DWARF 1.1 and DWARF 2 */
  118. .debug_aranges 0 : { *(.debug_aranges) }
  119. .debug_pubnames 0 : { *(.debug_pubnames) }
  120. /* DWARF 2 */
  121. .debug_info 0 : { *(.debug_info) }
  122. .debug_abbrev 0 : { *(.debug_abbrev) }
  123. .debug_line 0 : { *(.debug_line) }
  124. .debug_frame 0 : { *(.debug_frame) }
  125. .debug_str 0 : { *(.debug_str) }
  126. .debug_loc 0 : { *(.debug_loc) }
  127. .debug_macinfo 0 : { *(.debug_macinfo) }
  128. /* SGI/MIPS DWARF 2 extensions */
  129. .debug_weaknames 0 : { *(.debug_weaknames) }
  130. .debug_funcnames 0 : { *(.debug_funcnames) }
  131. .debug_typenames 0 : { *(.debug_typenames) }
  132. .debug_varnames 0 : { *(.debug_varnames) }
  133. /* These must appear regardless of . */
  134. }