PageRenderTime 56ms CodeModel.GetById 31ms RepoModel.GetById 0ms app.codeStats 0ms

/xen/arch/x86/xen.lds.S

https://bitbucket.org/sp/xen-unstable
Assembly | 137 lines | 124 code | 13 blank | 0 comment | 1 complexity | acde5f8c1c3d467ee6b4d20775cd1b29 MD5 | raw file
Possible License(s): GPL-2.0, LGPL-2.1, BSD-3-Clause, LGPL-2.0
  1. /* Excerpts written by Martin Mares <mj@atrey.karlin.mff.cuni.cz> */
  2. /* Modified for i386/x86-64 Xen by Keir Fraser */
  3. #include <xen/config.h>
  4. #include <xen/cache.h>
  5. #include <asm/page.h>
  6. #include <asm/percpu.h>
  7. #undef ENTRY
  8. #undef ALIGN
  9. #ifdef __x86_64__
  10. OUTPUT_FORMAT("elf64-x86-64", "elf64-x86-64", "elf64-x86-64")
  11. OUTPUT_ARCH(i386:x86-64)
  12. #else
  13. OUTPUT_FORMAT("elf32-i386", "elf32-i386", "elf32-i386")
  14. OUTPUT_ARCH(i386)
  15. #endif
  16. ENTRY(start)
  17. PHDRS
  18. {
  19. text PT_LOAD ;
  20. }
  21. SECTIONS
  22. {
  23. . = __XEN_VIRT_START + 0x100000;
  24. _start = .;
  25. .text : {
  26. _stext = .; /* Text and read-only data */
  27. *(.text)
  28. *(.fixup)
  29. *(.gnu.warning)
  30. _etext = .; /* End of text section */
  31. } :text = 0x9090
  32. .rodata : {
  33. *(.rodata)
  34. *(.rodata.*)
  35. } :text
  36. . = ALIGN(32); /* Exception table */
  37. __ex_table : {
  38. __start___ex_table = .;
  39. *(__ex_table)
  40. __stop___ex_table = .;
  41. } :text
  42. . = ALIGN(32); /* Pre-exception table */
  43. __pre_ex_table : {
  44. __start___pre_ex_table = .;
  45. *(__pre_ex_table)
  46. __stop___pre_ex_table = .;
  47. } :text
  48. .data : { /* Data */
  49. . = ALIGN(PAGE_SIZE);
  50. *(.data.page_aligned)
  51. *(.data)
  52. CONSTRUCTORS
  53. } :text
  54. . = ALIGN(SMP_CACHE_BYTES);
  55. .data.read_mostly : {
  56. *(.data.read_mostly)
  57. } :text
  58. #ifdef LOCK_PROFILE
  59. . = ALIGN(32);
  60. __lock_profile_start = .;
  61. .lockprofile.data : { *(.lockprofile.data) } :text
  62. __lock_profile_end = .;
  63. #endif
  64. . = ALIGN(PAGE_SIZE); /* Init code and data */
  65. __init_begin = .;
  66. .init.text : {
  67. _sinittext = .;
  68. *(.init.text)
  69. _einittext = .;
  70. } :text
  71. .init.data : {
  72. *(.init.data)
  73. } :text
  74. . = ALIGN(32);
  75. .init.setup : {
  76. __setup_start = .;
  77. *(.init.setup)
  78. __setup_end = .;
  79. } :text
  80. .initcall.init : {
  81. __initcall_start = .;
  82. *(.initcallpresmp.init)
  83. __presmp_initcall_end = .;
  84. *(.initcall1.init)
  85. __initcall_end = .;
  86. } :text
  87. .xsm_initcall.init : {
  88. __xsm_initcall_start = .;
  89. *(.xsm_initcall.init)
  90. __xsm_initcall_end = .;
  91. } :text
  92. . = ALIGN(STACK_SIZE);
  93. __init_end = .;
  94. .bss : { /* BSS */
  95. __bss_start = .;
  96. *(.bss.stack_aligned)
  97. . = ALIGN(PAGE_SIZE);
  98. *(.bss.page_aligned)
  99. *(.bss)
  100. . = ALIGN(SMP_CACHE_BYTES);
  101. __per_cpu_start = .;
  102. *(.bss.percpu)
  103. . = ALIGN(SMP_CACHE_BYTES);
  104. *(.bss.percpu.read_mostly)
  105. . = ALIGN(SMP_CACHE_BYTES);
  106. __per_cpu_data_end = .;
  107. } :text
  108. _end = . ;
  109. /* Sections to be discarded */
  110. /DISCARD/ : {
  111. *(.exit.text)
  112. *(.exit.data)
  113. *(.exitcall.exit)
  114. *(.eh_frame)
  115. }
  116. /* Stabs debugging sections. */
  117. .stab 0 : { *(.stab) }
  118. .stabstr 0 : { *(.stabstr) }
  119. .stab.excl 0 : { *(.stab.excl) }
  120. .stab.exclstr 0 : { *(.stab.exclstr) }
  121. .stab.index 0 : { *(.stab.index) }
  122. .stab.indexstr 0 : { *(.stab.indexstr) }
  123. .comment 0 : { *(.comment) }
  124. }