vmlinux.lds.S 6.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285
  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_TEXT
  40. SCHED_TEXT
  41. LOCK_TEXT
  42. KPROBES_TEXT
  43. *(.gnu.linkonce.t*)
  44. }
  45. .text.head : AT(ADDR(.text.head) - LOAD_OFFSET)
  46. { *(.text.head) }
  47. .text2 : AT(ADDR(.text2) - LOAD_OFFSET)
  48. { *(.text2) }
  49. #ifdef CONFIG_SMP
  50. .text.lock : AT(ADDR(.text.lock) - LOAD_OFFSET)
  51. { *(.text.lock) }
  52. #endif
  53. _etext = .;
  54. /* Read-only data */
  55. /* Exception table */
  56. . = ALIGN(16);
  57. __ex_table : AT(ADDR(__ex_table) - LOAD_OFFSET)
  58. {
  59. __start___ex_table = .;
  60. *(__ex_table)
  61. __stop___ex_table = .;
  62. }
  63. /* MCA table */
  64. . = ALIGN(16);
  65. __mca_table : AT(ADDR(__mca_table) - LOAD_OFFSET)
  66. {
  67. __start___mca_table = .;
  68. *(__mca_table)
  69. __stop___mca_table = .;
  70. }
  71. .data.patch.phys_stack_reg : AT(ADDR(.data.patch.phys_stack_reg) - LOAD_OFFSET)
  72. {
  73. __start___phys_stack_reg_patchlist = .;
  74. *(.data.patch.phys_stack_reg)
  75. __end___phys_stack_reg_patchlist = .;
  76. }
  77. /* Global data */
  78. _data = .;
  79. /* Unwind info & table: */
  80. . = ALIGN(8);
  81. .IA_64.unwind_info : AT(ADDR(.IA_64.unwind_info) - LOAD_OFFSET)
  82. { *(.IA_64.unwind_info*) }
  83. .IA_64.unwind : AT(ADDR(.IA_64.unwind) - LOAD_OFFSET)
  84. {
  85. __start_unwind = .;
  86. *(.IA_64.unwind*)
  87. __end_unwind = .;
  88. }
  89. RODATA
  90. .opd : AT(ADDR(.opd) - LOAD_OFFSET)
  91. { *(.opd) }
  92. /* Initialization code and data: */
  93. . = ALIGN(PAGE_SIZE);
  94. __init_begin = .;
  95. .init.text : AT(ADDR(.init.text) - LOAD_OFFSET)
  96. {
  97. _sinittext = .;
  98. *(.init.text)
  99. _einittext = .;
  100. }
  101. .init.data : AT(ADDR(.init.data) - LOAD_OFFSET)
  102. { *(.init.data) }
  103. #ifdef CONFIG_BLK_DEV_INITRD
  104. .init.ramfs : AT(ADDR(.init.ramfs) - LOAD_OFFSET)
  105. {
  106. __initramfs_start = .;
  107. *(.init.ramfs)
  108. __initramfs_end = .;
  109. }
  110. #endif
  111. . = ALIGN(16);
  112. .init.setup : AT(ADDR(.init.setup) - LOAD_OFFSET)
  113. {
  114. __setup_start = .;
  115. *(.init.setup)
  116. __setup_end = .;
  117. }
  118. .initcall.init : AT(ADDR(.initcall.init) - LOAD_OFFSET)
  119. {
  120. __initcall_start = .;
  121. INITCALLS
  122. __initcall_end = .;
  123. }
  124. .data.patch.vtop : AT(ADDR(.data.patch.vtop) - LOAD_OFFSET)
  125. {
  126. __start___vtop_patchlist = .;
  127. *(.data.patch.vtop)
  128. __end___vtop_patchlist = .;
  129. }
  130. .data.patch.mckinley_e9 : AT(ADDR(.data.patch.mckinley_e9) - LOAD_OFFSET)
  131. {
  132. __start___mckinley_e9_bundles = .;
  133. *(.data.patch.mckinley_e9)
  134. __end___mckinley_e9_bundles = .;
  135. }
  136. #if defined(CONFIG_IA64_GENERIC)
  137. /* Machine Vector */
  138. . = ALIGN(16);
  139. .machvec : AT(ADDR(.machvec) - LOAD_OFFSET)
  140. {
  141. machvec_start = .;
  142. *(.machvec)
  143. machvec_end = .;
  144. }
  145. #endif
  146. . = ALIGN(8);
  147. __con_initcall_start = .;
  148. .con_initcall.init : AT(ADDR(.con_initcall.init) - LOAD_OFFSET)
  149. { *(.con_initcall.init) }
  150. __con_initcall_end = .;
  151. __security_initcall_start = .;
  152. .security_initcall.init : AT(ADDR(.security_initcall.init) - LOAD_OFFSET)
  153. { *(.security_initcall.init) }
  154. __security_initcall_end = .;
  155. . = ALIGN(PAGE_SIZE);
  156. __init_end = .;
  157. /* The initial task and kernel stack */
  158. .data.init_task : AT(ADDR(.data.init_task) - LOAD_OFFSET)
  159. { *(.data.init_task) }
  160. .data.page_aligned : AT(ADDR(.data.page_aligned) - LOAD_OFFSET)
  161. { *(__special_page_section)
  162. __start_gate_section = .;
  163. *(.data.gate)
  164. __stop_gate_section = .;
  165. }
  166. . = ALIGN(PAGE_SIZE); /* make sure the gate page doesn't expose
  167. * kernel data
  168. */
  169. .data.read_mostly : AT(ADDR(.data.read_mostly) - LOAD_OFFSET)
  170. { *(.data.read_mostly) }
  171. .data.cacheline_aligned : AT(ADDR(.data.cacheline_aligned) - LOAD_OFFSET)
  172. { *(.data.cacheline_aligned) }
  173. /* Per-cpu data: */
  174. percpu : { } :percpu
  175. . = ALIGN(PERCPU_PAGE_SIZE);
  176. __phys_per_cpu_start = .;
  177. .data.percpu PERCPU_ADDR : AT(__phys_per_cpu_start - LOAD_OFFSET)
  178. {
  179. __per_cpu_start = .;
  180. *(.data.percpu)
  181. *(.data.percpu.shared_aligned)
  182. __per_cpu_end = .;
  183. }
  184. . = __phys_per_cpu_start + PERCPU_PAGE_SIZE; /* ensure percpu data fits
  185. * into percpu page size
  186. */
  187. data : { } :data
  188. .data : AT(ADDR(.data) - LOAD_OFFSET)
  189. {
  190. DATA_DATA
  191. *(.data1)
  192. *(.gnu.linkonce.d*)
  193. CONSTRUCTORS
  194. }
  195. . = ALIGN(16); /* gp must be 16-byte aligned for exc. table */
  196. .got : AT(ADDR(.got) - LOAD_OFFSET)
  197. { *(.got.plt) *(.got) }
  198. __gp = ADDR(.got) + 0x200000;
  199. /* We want the small data sections together, so single-instruction offsets
  200. can access them all, and initialized data all before uninitialized, so
  201. we can shorten the on-disk segment size. */
  202. .sdata : AT(ADDR(.sdata) - LOAD_OFFSET)
  203. { *(.sdata) *(.sdata1) *(.srdata) }
  204. _edata = .;
  205. _bss = .;
  206. .sbss : AT(ADDR(.sbss) - LOAD_OFFSET)
  207. { *(.sbss) *(.scommon) }
  208. .bss : AT(ADDR(.bss) - LOAD_OFFSET)
  209. { *(.bss) *(COMMON) }
  210. _end = .;
  211. code : { } :code
  212. /* Stabs debugging sections. */
  213. .stab 0 : { *(.stab) }
  214. .stabstr 0 : { *(.stabstr) }
  215. .stab.excl 0 : { *(.stab.excl) }
  216. .stab.exclstr 0 : { *(.stab.exclstr) }
  217. .stab.index 0 : { *(.stab.index) }
  218. .stab.indexstr 0 : { *(.stab.indexstr) }
  219. /* DWARF debug sections.
  220. Symbols in the DWARF debugging sections are relative to the beginning
  221. of the section so we begin them at 0. */
  222. /* DWARF 1 */
  223. .debug 0 : { *(.debug) }
  224. .line 0 : { *(.line) }
  225. /* GNU DWARF 1 extensions */
  226. .debug_srcinfo 0 : { *(.debug_srcinfo) }
  227. .debug_sfnames 0 : { *(.debug_sfnames) }
  228. /* DWARF 1.1 and DWARF 2 */
  229. .debug_aranges 0 : { *(.debug_aranges) }
  230. .debug_pubnames 0 : { *(.debug_pubnames) }
  231. /* DWARF 2 */
  232. .debug_info 0 : { *(.debug_info) }
  233. .debug_abbrev 0 : { *(.debug_abbrev) }
  234. .debug_line 0 : { *(.debug_line) }
  235. .debug_frame 0 : { *(.debug_frame) }
  236. .debug_str 0 : { *(.debug_str) }
  237. .debug_loc 0 : { *(.debug_loc) }
  238. .debug_macinfo 0 : { *(.debug_macinfo) }
  239. /* SGI/MIPS DWARF 2 extensions */
  240. .debug_weaknames 0 : { *(.debug_weaknames) }
  241. .debug_funcnames 0 : { *(.debug_funcnames) }
  242. .debug_typenames 0 : { *(.debug_typenames) }
  243. .debug_varnames 0 : { *(.debug_varnames) }
  244. /* These must appear regardless of . */
  245. /* Discard them for now since Intel SoftSDV cannot handle them.
  246. .comment 0 : { *(.comment) }
  247. .note 0 : { *(.note) }
  248. */
  249. /DISCARD/ : { *(.comment) }
  250. /DISCARD/ : { *(.note) }
  251. }