vmlinux.lds.S 2.8 KB

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