vmlinux.lds.S 6.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277
  1. #include <asm/cache.h>
  2. #include <asm/ptrace.h>
  3. #include <asm/system.h>
  4. #include <asm/pgtable.h>
  5. #define LOAD_OFFSET (KERNEL_START - KERNEL_TR_PAGE_SIZE)
  6. #include <asm-generic/vmlinux.lds.h>
  7. #define IVT_TEXT \
  8. VMLINUX_SYMBOL(__start_ivt_text) = .; \
  9. *(.text.ivt) \
  10. VMLINUX_SYMBOL(__end_ivt_text) = .;
  11. OUTPUT_FORMAT("elf64-ia64-little")
  12. OUTPUT_ARCH(ia64)
  13. ENTRY(phys_start)
  14. jiffies = jiffies_64;
  15. PHDRS {
  16. code PT_LOAD;
  17. percpu PT_LOAD;
  18. data PT_LOAD;
  19. }
  20. SECTIONS
  21. {
  22. /* Sections to be discarded */
  23. /DISCARD/ : {
  24. *(.exit.text)
  25. *(.exit.data)
  26. *(.exitcall.exit)
  27. *(.IA_64.unwind.exit.text)
  28. *(.IA_64.unwind_info.exit.text)
  29. }
  30. v = PAGE_OFFSET; /* this symbol is here to make debugging easier... */
  31. phys_start = _start - LOAD_OFFSET;
  32. code : { } :code
  33. . = KERNEL_START;
  34. _text = .;
  35. _stext = .;
  36. .text : AT(ADDR(.text) - LOAD_OFFSET)
  37. {
  38. IVT_TEXT
  39. *(.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. #ifdef CONFIG_SMP
  48. .text.lock : AT(ADDR(.text.lock) - LOAD_OFFSET)
  49. { *(.text.lock) }
  50. #endif
  51. _etext = .;
  52. /* Read-only data */
  53. /* Exception table */
  54. . = ALIGN(16);
  55. __ex_table : AT(ADDR(__ex_table) - LOAD_OFFSET)
  56. {
  57. __start___ex_table = .;
  58. *(__ex_table)
  59. __stop___ex_table = .;
  60. }
  61. /* MCA table */
  62. . = ALIGN(16);
  63. __mca_table : AT(ADDR(__mca_table) - LOAD_OFFSET)
  64. {
  65. __start___mca_table = .;
  66. *(__mca_table)
  67. __stop___mca_table = .;
  68. }
  69. .data.patch.phys_stack_reg : AT(ADDR(.data.patch.phys_stack_reg) - LOAD_OFFSET)
  70. {
  71. __start___phys_stack_reg_patchlist = .;
  72. *(.data.patch.phys_stack_reg)
  73. __end___phys_stack_reg_patchlist = .;
  74. }
  75. /* Global data */
  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. .IA_64.unwind : AT(ADDR(.IA_64.unwind) - LOAD_OFFSET)
  82. {
  83. __start_unwind = .;
  84. *(.IA_64.unwind*)
  85. __end_unwind = .;
  86. }
  87. RODATA
  88. .opd : AT(ADDR(.opd) - LOAD_OFFSET)
  89. { *(.opd) }
  90. /* Initialization code and data: */
  91. . = ALIGN(PAGE_SIZE);
  92. __init_begin = .;
  93. .init.text : AT(ADDR(.init.text) - LOAD_OFFSET)
  94. {
  95. _sinittext = .;
  96. *(.init.text)
  97. _einittext = .;
  98. }
  99. .init.data : AT(ADDR(.init.data) - LOAD_OFFSET)
  100. { *(.init.data) }
  101. #ifdef CONFIG_BLK_DEV_INITRD
  102. .init.ramfs : AT(ADDR(.init.ramfs) - LOAD_OFFSET)
  103. {
  104. __initramfs_start = .;
  105. *(.init.ramfs)
  106. __initramfs_end = .;
  107. }
  108. #endif
  109. . = ALIGN(16);
  110. .init.setup : AT(ADDR(.init.setup) - LOAD_OFFSET)
  111. {
  112. __setup_start = .;
  113. *(.init.setup)
  114. __setup_end = .;
  115. }
  116. .initcall.init : AT(ADDR(.initcall.init) - LOAD_OFFSET)
  117. {
  118. __initcall_start = .;
  119. INITCALLS
  120. __initcall_end = .;
  121. }
  122. .data.patch.vtop : AT(ADDR(.data.patch.vtop) - LOAD_OFFSET)
  123. {
  124. __start___vtop_patchlist = .;
  125. *(.data.patch.vtop)
  126. __end___vtop_patchlist = .;
  127. }
  128. .data.patch.mckinley_e9 : AT(ADDR(.data.patch.mckinley_e9) - LOAD_OFFSET)
  129. {
  130. __start___mckinley_e9_bundles = .;
  131. *(.data.patch.mckinley_e9)
  132. __end___mckinley_e9_bundles = .;
  133. }
  134. #if defined(CONFIG_IA64_GENERIC)
  135. /* Machine Vector */
  136. . = ALIGN(16);
  137. .machvec : AT(ADDR(.machvec) - LOAD_OFFSET)
  138. {
  139. machvec_start = .;
  140. *(.machvec)
  141. machvec_end = .;
  142. }
  143. #endif
  144. . = ALIGN(8);
  145. __con_initcall_start = .;
  146. .con_initcall.init : AT(ADDR(.con_initcall.init) - LOAD_OFFSET)
  147. { *(.con_initcall.init) }
  148. __con_initcall_end = .;
  149. __security_initcall_start = .;
  150. .security_initcall.init : AT(ADDR(.security_initcall.init) - LOAD_OFFSET)
  151. { *(.security_initcall.init) }
  152. __security_initcall_end = .;
  153. . = ALIGN(PAGE_SIZE);
  154. __init_end = .;
  155. /* The initial task and kernel stack */
  156. .data.init_task : AT(ADDR(.data.init_task) - LOAD_OFFSET)
  157. { *(.data.init_task) }
  158. .data.page_aligned : AT(ADDR(.data.page_aligned) - LOAD_OFFSET)
  159. { *(__special_page_section)
  160. __start_gate_section = .;
  161. *(.data.gate)
  162. __stop_gate_section = .;
  163. }
  164. . = ALIGN(PAGE_SIZE); /* make sure the gate page doesn't expose
  165. * kernel data
  166. */
  167. .data.read_mostly : AT(ADDR(.data.read_mostly) - LOAD_OFFSET)
  168. { *(.data.read_mostly) }
  169. .data.cacheline_aligned : AT(ADDR(.data.cacheline_aligned) - LOAD_OFFSET)
  170. { *(.data.cacheline_aligned) }
  171. /* Per-cpu data: */
  172. percpu : { } :percpu
  173. . = ALIGN(PERCPU_PAGE_SIZE);
  174. __phys_per_cpu_start = .;
  175. .data.percpu PERCPU_ADDR : AT(__phys_per_cpu_start - LOAD_OFFSET)
  176. {
  177. __per_cpu_start = .;
  178. *(.data.percpu)
  179. __per_cpu_end = .;
  180. }
  181. . = __phys_per_cpu_start + PERCPU_PAGE_SIZE; /* ensure percpu data fits
  182. * into percpu page size
  183. */
  184. data : { } :data
  185. .data : AT(ADDR(.data) - LOAD_OFFSET)
  186. { *(.data) *(.data1) *(.gnu.linkonce.d*) CONSTRUCTORS }
  187. . = ALIGN(16); /* gp must be 16-byte aligned for exc. table */
  188. .got : AT(ADDR(.got) - LOAD_OFFSET)
  189. { *(.got.plt) *(.got) }
  190. __gp = ADDR(.got) + 0x200000;
  191. /* We want the small data sections together, so single-instruction offsets
  192. can access them all, and initialized data all before uninitialized, so
  193. we can shorten the on-disk segment size. */
  194. .sdata : AT(ADDR(.sdata) - LOAD_OFFSET)
  195. { *(.sdata) *(.sdata1) *(.srdata) }
  196. _edata = .;
  197. _bss = .;
  198. .sbss : AT(ADDR(.sbss) - LOAD_OFFSET)
  199. { *(.sbss) *(.scommon) }
  200. .bss : AT(ADDR(.bss) - LOAD_OFFSET)
  201. { *(.bss) *(COMMON) }
  202. _end = .;
  203. code : { } :code
  204. /* Stabs debugging sections. */
  205. .stab 0 : { *(.stab) }
  206. .stabstr 0 : { *(.stabstr) }
  207. .stab.excl 0 : { *(.stab.excl) }
  208. .stab.exclstr 0 : { *(.stab.exclstr) }
  209. .stab.index 0 : { *(.stab.index) }
  210. .stab.indexstr 0 : { *(.stab.indexstr) }
  211. /* DWARF debug sections.
  212. Symbols in the DWARF debugging sections are relative to the beginning
  213. of the section so we begin them at 0. */
  214. /* DWARF 1 */
  215. .debug 0 : { *(.debug) }
  216. .line 0 : { *(.line) }
  217. /* GNU DWARF 1 extensions */
  218. .debug_srcinfo 0 : { *(.debug_srcinfo) }
  219. .debug_sfnames 0 : { *(.debug_sfnames) }
  220. /* DWARF 1.1 and DWARF 2 */
  221. .debug_aranges 0 : { *(.debug_aranges) }
  222. .debug_pubnames 0 : { *(.debug_pubnames) }
  223. /* DWARF 2 */
  224. .debug_info 0 : { *(.debug_info) }
  225. .debug_abbrev 0 : { *(.debug_abbrev) }
  226. .debug_line 0 : { *(.debug_line) }
  227. .debug_frame 0 : { *(.debug_frame) }
  228. .debug_str 0 : { *(.debug_str) }
  229. .debug_loc 0 : { *(.debug_loc) }
  230. .debug_macinfo 0 : { *(.debug_macinfo) }
  231. /* SGI/MIPS DWARF 2 extensions */
  232. .debug_weaknames 0 : { *(.debug_weaknames) }
  233. .debug_funcnames 0 : { *(.debug_funcnames) }
  234. .debug_typenames 0 : { *(.debug_typenames) }
  235. .debug_varnames 0 : { *(.debug_varnames) }
  236. /* These must appear regardless of . */
  237. /* Discard them for now since Intel SoftSDV cannot handle them.
  238. .comment 0 : { *(.comment) }
  239. .note 0 : { *(.note) }
  240. */
  241. /DISCARD/ : { *(.comment) }
  242. /DISCARD/ : { *(.note) }
  243. }