vmlinux.lds.S 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185
  1. /* ld script for sparc32/sparc64 kernel */
  2. #include <asm-generic/vmlinux.lds.h>
  3. #include <asm/page.h>
  4. #include <asm/thread_info.h>
  5. #ifdef CONFIG_SPARC32
  6. #define INITIAL_ADDRESS 0x10000 + SIZEOF_HEADERS
  7. #define TEXTSTART 0xf0004000
  8. #define SMP_CACHE_BYTES_SHIFT 5
  9. #else
  10. #define SMP_CACHE_BYTES_SHIFT 6
  11. #define INITIAL_ADDRESS 0x4000
  12. #define TEXTSTART 0x0000000000404000
  13. #endif
  14. #define SMP_CACHE_BYTES (1 << SMP_CACHE_BYTES_SHIFT)
  15. #ifdef CONFIG_SPARC32
  16. OUTPUT_FORMAT("elf32-sparc", "elf32-sparc", "elf32-sparc")
  17. OUTPUT_ARCH(sparc)
  18. ENTRY(_start)
  19. jiffies = jiffies_64 + 4;
  20. #else
  21. /* sparc64 */
  22. OUTPUT_FORMAT("elf64-sparc", "elf64-sparc", "elf64-sparc")
  23. OUTPUT_ARCH(sparc:v9a)
  24. ENTRY(_start)
  25. jiffies = jiffies_64;
  26. #endif
  27. SECTIONS
  28. {
  29. /* swapper_low_pmd_dir is sparc64 only */
  30. swapper_low_pmd_dir = 0x0000000000402000;
  31. . = INITIAL_ADDRESS;
  32. .text TEXTSTART :
  33. {
  34. _text = .;
  35. *(.text.head)
  36. TEXT_TEXT
  37. SCHED_TEXT
  38. LOCK_TEXT
  39. KPROBES_TEXT
  40. *(.gnu.warning)
  41. } = 0
  42. _etext = .;
  43. PROVIDE (etext = .);
  44. RO_DATA(PAGE_SIZE)
  45. .data : {
  46. DATA_DATA
  47. CONSTRUCTORS
  48. }
  49. .data1 : {
  50. *(.data1)
  51. }
  52. . = ALIGN(SMP_CACHE_BYTES);
  53. .data.cacheline_aligned : {
  54. *(.data.cacheline_aligned)
  55. }
  56. . = ALIGN(SMP_CACHE_BYTES);
  57. .data.read_mostly : {
  58. *(.data.read_mostly)
  59. }
  60. /* End of data section */
  61. _edata = .;
  62. PROVIDE (edata = .);
  63. /* init_task */
  64. . = ALIGN(THREAD_SIZE);
  65. .data.init_task : {
  66. *(.data.init_task)
  67. }
  68. .fixup : {
  69. __start___fixup = .;
  70. *(.fixup)
  71. __stop___fixup = .;
  72. }
  73. . = ALIGN(16);
  74. __ex_table : {
  75. __start___ex_table = .;
  76. *(__ex_table)
  77. __stop___ex_table = .;
  78. }
  79. NOTES
  80. . = ALIGN(PAGE_SIZE);
  81. .init.text : {
  82. __init_begin = .;
  83. _sinittext = .;
  84. INIT_TEXT
  85. _einittext = .;
  86. }
  87. __init_text_end = .;
  88. .init.data : {
  89. INIT_DATA
  90. }
  91. . = ALIGN(16);
  92. .init.setup : {
  93. __setup_start = .;
  94. *(.init.setup)
  95. __setup_end = .;
  96. }
  97. .initcall.init : {
  98. __initcall_start = .;
  99. INITCALLS
  100. __initcall_end = .;
  101. }
  102. .con_initcall.init : {
  103. __con_initcall_start = .;
  104. *(.con_initcall.init)
  105. __con_initcall_end = .;
  106. }
  107. SECURITY_INIT
  108. . = ALIGN(4);
  109. .tsb_ldquad_phys_patch : {
  110. __tsb_ldquad_phys_patch = .;
  111. *(.tsb_ldquad_phys_patch)
  112. __tsb_ldquad_phys_patch_end = .;
  113. }
  114. .tsb_phys_patch : {
  115. __tsb_phys_patch = .;
  116. *(.tsb_phys_patch)
  117. __tsb_phys_patch_end = .;
  118. }
  119. .cpuid_patch : {
  120. __cpuid_patch = .;
  121. *(.cpuid_patch)
  122. __cpuid_patch_end = .;
  123. }
  124. .sun4v_1insn_patch : {
  125. __sun4v_1insn_patch = .;
  126. *(.sun4v_1insn_patch)
  127. __sun4v_1insn_patch_end = .;
  128. }
  129. .sun4v_2insn_patch : {
  130. __sun4v_2insn_patch = .;
  131. *(.sun4v_2insn_patch)
  132. __sun4v_2insn_patch_end = .;
  133. }
  134. #ifdef CONFIG_BLK_DEV_INITRD
  135. . = ALIGN(PAGE_SIZE);
  136. .init.ramfs : {
  137. __initramfs_start = .;
  138. *(.init.ramfs)
  139. __initramfs_end = .;
  140. }
  141. #endif
  142. PERCPU(PAGE_SIZE)
  143. . = ALIGN(PAGE_SIZE);
  144. __init_end = .;
  145. __bss_start = .;
  146. .sbss : {
  147. *(.sbss)
  148. *(.scommon)
  149. }
  150. .bss : {
  151. *(.dynbss)
  152. *(.bss)
  153. *(COMMON)
  154. }
  155. _end = . ;
  156. PROVIDE (end = .);
  157. /DISCARD/ : {
  158. EXIT_TEXT
  159. EXIT_DATA
  160. *(.exitcall.exit)
  161. }
  162. STABS_DEBUG
  163. DWARF_DEBUG
  164. }