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