vmlinux.lds.S 6.6 KB

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