vmlinux.lds.S 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147
  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-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. . = CONFIG_PAGE_OFFSET + 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(PAGE_SIZE);
  39. __rd_start = .;
  40. *(.initrd)
  41. . = ALIGN(PAGE_SIZE);
  42. __rd_end = .;
  43. CONSTRUCTORS
  44. }
  45. . = ALIGN(PAGE_SIZE);
  46. .data.page_aligned : { *(.data.page_aligned) }
  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(THREAD_SIZE); /* init_task */
  54. .data.init_task : { *(.data.init_task) }
  55. . = ALIGN(PAGE_SIZE); /* Init code and data */
  56. __init_begin = .;
  57. _sinittext = .;
  58. .init.text : { *(.init.text) }
  59. _einittext = .;
  60. .init.data : { *(.init.data) }
  61. . = ALIGN(16);
  62. __setup_start = .;
  63. .init.setup : { *(.init.setup) }
  64. __setup_end = .;
  65. __initcall_start = .;
  66. .initcall.init : {
  67. INITCALLS
  68. }
  69. __initcall_end = .;
  70. __con_initcall_start = .;
  71. .con_initcall.init : { *(.con_initcall.init) }
  72. __con_initcall_end = .;
  73. SECURITY_INIT
  74. __initramfs_start = .;
  75. .init.ramfs : { *(.init.ramfs) }
  76. __initramfs_end = .;
  77. __machvec_start = .;
  78. .init.machvec : { *(.init.machvec) }
  79. __machvec_end = .;
  80. . = ALIGN(PAGE_SIZE);
  81. __init_end = .;
  82. . = ALIGN(4);
  83. __bss_start = .; /* BSS */
  84. .bss : { *(.bss) }
  85. . = ALIGN(4);
  86. _end = . ;
  87. /* When something in the kernel is NOT compiled as a module, the
  88. * module cleanup code and data are put into these segments. Both
  89. * can then be thrown away, as cleanup code is never called unless
  90. * it's a module.
  91. */
  92. /DISCARD/ : {
  93. *(.exit.text)
  94. *(.exit.data)
  95. *(.exitcall.exit)
  96. }
  97. /* Stabs debugging sections. */
  98. .stab 0 : { *(.stab) }
  99. .stabstr 0 : { *(.stabstr) }
  100. .stab.excl 0 : { *(.stab.excl) }
  101. .stab.exclstr 0 : { *(.stab.exclstr) }
  102. .stab.index 0 : { *(.stab.index) }
  103. .stab.indexstr 0 : { *(.stab.indexstr) }
  104. .comment 0 : { *(.comment) }
  105. /* DWARF debug sections.
  106. Symbols in the DWARF debugging section are relative to the beginning
  107. of the section so we begin .debug at 0. */
  108. /* DWARF 1 */
  109. .debug 0 : { *(.debug) }
  110. .line 0 : { *(.line) }
  111. /* GNU DWARF 1 extensions */
  112. .debug_srcinfo 0 : { *(.debug_srcinfo) }
  113. .debug_sfnames 0 : { *(.debug_sfnames) }
  114. /* DWARF 1.1 and DWARF 2 */
  115. .debug_aranges 0 : { *(.debug_aranges) }
  116. .debug_pubnames 0 : { *(.debug_pubnames) }
  117. /* DWARF 2 */
  118. .debug_info 0 : { *(.debug_info) }
  119. .debug_abbrev 0 : { *(.debug_abbrev) }
  120. .debug_line 0 : { *(.debug_line) }
  121. .debug_frame 0 : { *(.debug_frame) }
  122. .debug_str 0 : { *(.debug_str) }
  123. .debug_loc 0 : { *(.debug_loc) }
  124. .debug_macinfo 0 : { *(.debug_macinfo) }
  125. /* SGI/MIPS DWARF 2 extensions */
  126. .debug_weaknames 0 : { *(.debug_weaknames) }
  127. .debug_funcnames 0 : { *(.debug_funcnames) }
  128. .debug_typenames 0 : { *(.debug_typenames) }
  129. .debug_varnames 0 : { *(.debug_varnames) }
  130. /* These must appear regardless of . */
  131. }