vmlinux.lds.S 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256
  1. #include <asm/cache.h>
  2. #include <asm/ptrace.h>
  3. #include <asm/system.h>
  4. #include <asm/pgtable.h>
  5. #include <asm-generic/vmlinux.lds.h>
  6. OUTPUT_FORMAT("elf64-ia64-little")
  7. OUTPUT_ARCH(ia64)
  8. ENTRY(phys_start)
  9. jiffies = jiffies_64;
  10. PHDRS {
  11. code PT_LOAD;
  12. percpu PT_LOAD;
  13. data PT_LOAD;
  14. note PT_NOTE;
  15. unwind 0x70000001; /* PT_IA_64_UNWIND, but ld doesn't match the name */
  16. }
  17. SECTIONS {
  18. /*
  19. * unwind exit sections must be discarded before
  20. * the rest of the sections get included.
  21. */
  22. /DISCARD/ : {
  23. *(.IA_64.unwind.exit.text)
  24. *(.IA_64.unwind_info.exit.text)
  25. *(.comment)
  26. *(.note)
  27. }
  28. v = PAGE_OFFSET; /* this symbol is here to make debugging easier... */
  29. phys_start = _start - LOAD_OFFSET;
  30. code : {
  31. } :code
  32. . = KERNEL_START;
  33. _text = .;
  34. _stext = .;
  35. .text : AT(ADDR(.text) - LOAD_OFFSET) {
  36. __start_ivt_text = .;
  37. *(.text..ivt)
  38. __end_ivt_text = .;
  39. TEXT_TEXT
  40. SCHED_TEXT
  41. LOCK_TEXT
  42. KPROBES_TEXT
  43. *(.gnu.linkonce.t*)
  44. }
  45. .text2 : AT(ADDR(.text2) - LOAD_OFFSET) {
  46. *(.text2)
  47. }
  48. #ifdef CONFIG_SMP
  49. .text..lock : AT(ADDR(.text..lock) - LOAD_OFFSET) {
  50. *(.text..lock)
  51. }
  52. #endif
  53. _etext = .;
  54. /*
  55. * Read-only data
  56. */
  57. NOTES :code :note /* put .notes in text and mark in PT_NOTE */
  58. code_continues : {
  59. } : code /* switch back to regular program... */
  60. EXCEPTION_TABLE(16)
  61. /* MCA table */
  62. . = ALIGN(16);
  63. __mca_table : AT(ADDR(__mca_table) - LOAD_OFFSET) {
  64. __start___mca_table = .;
  65. *(__mca_table)
  66. __stop___mca_table = .;
  67. }
  68. .data..patch.phys_stack_reg : AT(ADDR(.data..patch.phys_stack_reg) - LOAD_OFFSET) {
  69. __start___phys_stack_reg_patchlist = .;
  70. *(.data..patch.phys_stack_reg)
  71. __end___phys_stack_reg_patchlist = .;
  72. }
  73. /*
  74. * Global data
  75. */
  76. _data = .;
  77. /* Unwind info & table: */
  78. . = ALIGN(8);
  79. .IA_64.unwind_info : AT(ADDR(.IA_64.unwind_info) - LOAD_OFFSET) {
  80. *(.IA_64.unwind_info*)
  81. }
  82. .IA_64.unwind : AT(ADDR(.IA_64.unwind) - LOAD_OFFSET) {
  83. __start_unwind = .;
  84. *(.IA_64.unwind*)
  85. __end_unwind = .;
  86. } :code :unwind
  87. code_continues2 : {
  88. } : code
  89. RODATA
  90. .opd : AT(ADDR(.opd) - LOAD_OFFSET) {
  91. *(.opd)
  92. }
  93. /*
  94. * Initialization code and data:
  95. */
  96. . = ALIGN(PAGE_SIZE);
  97. __init_begin = .;
  98. INIT_TEXT_SECTION(PAGE_SIZE)
  99. INIT_DATA_SECTION(16)
  100. .data..patch.vtop : AT(ADDR(.data..patch.vtop) - LOAD_OFFSET) {
  101. __start___vtop_patchlist = .;
  102. *(.data..patch.vtop)
  103. __end___vtop_patchlist = .;
  104. }
  105. .data..patch.rse : AT(ADDR(.data..patch.rse) - LOAD_OFFSET) {
  106. __start___rse_patchlist = .;
  107. *(.data..patch.rse)
  108. __end___rse_patchlist = .;
  109. }
  110. .data..patch.mckinley_e9 : AT(ADDR(.data..patch.mckinley_e9) - LOAD_OFFSET) {
  111. __start___mckinley_e9_bundles = .;
  112. *(.data..patch.mckinley_e9)
  113. __end___mckinley_e9_bundles = .;
  114. }
  115. #if defined(CONFIG_PARAVIRT)
  116. . = ALIGN(16);
  117. .paravirt_bundles : AT(ADDR(.paravirt_bundles) - LOAD_OFFSET) {
  118. __start_paravirt_bundles = .;
  119. *(.paravirt_bundles)
  120. __stop_paravirt_bundles = .;
  121. }
  122. . = ALIGN(16);
  123. .paravirt_insts : AT(ADDR(.paravirt_insts) - LOAD_OFFSET) {
  124. __start_paravirt_insts = .;
  125. *(.paravirt_insts)
  126. __stop_paravirt_insts = .;
  127. }
  128. . = ALIGN(16);
  129. .paravirt_branches : AT(ADDR(.paravirt_branches) - LOAD_OFFSET) {
  130. __start_paravirt_branches = .;
  131. *(.paravirt_branches)
  132. __stop_paravirt_branches = .;
  133. }
  134. #endif
  135. #if defined(CONFIG_IA64_GENERIC)
  136. /* Machine Vector */
  137. . = ALIGN(16);
  138. .machvec : AT(ADDR(.machvec) - LOAD_OFFSET) {
  139. machvec_start = .;
  140. *(.machvec)
  141. machvec_end = .;
  142. }
  143. #endif
  144. #ifdef CONFIG_SMP
  145. . = ALIGN(PERCPU_PAGE_SIZE);
  146. __cpu0_per_cpu = .;
  147. . = . + PERCPU_PAGE_SIZE; /* cpu0 per-cpu space */
  148. #endif
  149. . = ALIGN(PAGE_SIZE);
  150. __init_end = .;
  151. .data..page_aligned : AT(ADDR(.data..page_aligned) - LOAD_OFFSET) {
  152. PAGE_ALIGNED_DATA(PAGE_SIZE)
  153. . = ALIGN(PAGE_SIZE);
  154. __start_gate_section = .;
  155. *(.data..gate)
  156. __stop_gate_section = .;
  157. #ifdef CONFIG_XEN
  158. . = ALIGN(PAGE_SIZE);
  159. __xen_start_gate_section = .;
  160. *(.data..gate.xen)
  161. __xen_stop_gate_section = .;
  162. #endif
  163. }
  164. /*
  165. * make sure the gate page doesn't expose
  166. * kernel data
  167. */
  168. . = ALIGN(PAGE_SIZE);
  169. /* Per-cpu data: */
  170. . = ALIGN(PERCPU_PAGE_SIZE);
  171. PERCPU_VADDR(SMP_CACHE_BYTES, PERCPU_ADDR, :percpu)
  172. __phys_per_cpu_start = __per_cpu_load;
  173. /*
  174. * ensure percpu data fits
  175. * into percpu page size
  176. */
  177. . = __phys_per_cpu_start + PERCPU_PAGE_SIZE;
  178. data : {
  179. } :data
  180. .data : AT(ADDR(.data) - LOAD_OFFSET) {
  181. _sdata = .;
  182. INIT_TASK_DATA(PAGE_SIZE)
  183. CACHELINE_ALIGNED_DATA(SMP_CACHE_BYTES)
  184. READ_MOSTLY_DATA(SMP_CACHE_BYTES)
  185. DATA_DATA
  186. *(.data1)
  187. *(.gnu.linkonce.d*)
  188. CONSTRUCTORS
  189. }
  190. . = ALIGN(16); /* gp must be 16-byte aligned for exc. table */
  191. .got : AT(ADDR(.got) - LOAD_OFFSET) {
  192. *(.got.plt)
  193. *(.got)
  194. }
  195. __gp = ADDR(.got) + 0x200000;
  196. /*
  197. * We want the small data sections together,
  198. * so single-instruction offsets can access
  199. * them all, and initialized data all before
  200. * uninitialized, so we can shorten the
  201. * on-disk segment size.
  202. */
  203. .sdata : AT(ADDR(.sdata) - LOAD_OFFSET) {
  204. *(.sdata)
  205. *(.sdata1)
  206. *(.srdata)
  207. }
  208. _edata = .;
  209. BSS_SECTION(0, 0, 0)
  210. _end = .;
  211. code : {
  212. } :code
  213. STABS_DEBUG
  214. DWARF_DEBUG
  215. /* Default discards */
  216. DISCARDS
  217. }