/arch/ia64/kernel/vmlinux.lds.S

https://bitbucket.org/evzijst/gittest · Assembly · 251 lines · 196 code · 29 blank · 26 comment · 0 complexity · 34fff8be329c5527c5eabb24a3b9231d MD5 · raw file

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