vmlinux.lds.S 6.3 KB

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