vmlinux.lds.S 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166
  1. /* ld script to make ARM Linux kernel
  2. * taken from the i386 version by Russell King
  3. * Written by Martin Mares <mj@atrey.karlin.mff.cuni.cz>
  4. */
  5. #include <asm-generic/vmlinux.lds.h>
  6. #include <linux/config.h>
  7. OUTPUT_ARCH(arm)
  8. ENTRY(stext)
  9. #ifndef __ARMEB__
  10. jiffies = jiffies_64;
  11. #else
  12. jiffies = jiffies_64 + 4;
  13. #endif
  14. SECTIONS
  15. {
  16. . = TEXTADDR;
  17. .init : { /* Init code and data */
  18. _stext = .;
  19. _sinittext = .;
  20. *(.init.text)
  21. _einittext = .;
  22. __proc_info_begin = .;
  23. *(.proc.info)
  24. __proc_info_end = .;
  25. __arch_info_begin = .;
  26. *(.arch.info)
  27. __arch_info_end = .;
  28. __tagtable_begin = .;
  29. *(.taglist)
  30. __tagtable_end = .;
  31. . = ALIGN(16);
  32. __setup_start = .;
  33. *(.init.setup)
  34. __setup_end = .;
  35. __early_begin = .;
  36. *(__early_param)
  37. __early_end = .;
  38. __initcall_start = .;
  39. *(.initcall1.init)
  40. *(.initcall2.init)
  41. *(.initcall3.init)
  42. *(.initcall4.init)
  43. *(.initcall5.init)
  44. *(.initcall6.init)
  45. *(.initcall7.init)
  46. __initcall_end = .;
  47. __con_initcall_start = .;
  48. *(.con_initcall.init)
  49. __con_initcall_end = .;
  50. __security_initcall_start = .;
  51. *(.security_initcall.init)
  52. __security_initcall_end = .;
  53. . = ALIGN(32);
  54. __initramfs_start = .;
  55. usr/built-in.o(.init.ramfs)
  56. __initramfs_end = .;
  57. . = ALIGN(64);
  58. __per_cpu_start = .;
  59. *(.data.percpu)
  60. __per_cpu_end = .;
  61. #ifndef CONFIG_XIP_KERNEL
  62. __init_begin = _stext;
  63. *(.init.data)
  64. . = ALIGN(4096);
  65. __init_end = .;
  66. #endif
  67. }
  68. /DISCARD/ : { /* Exit code and data */
  69. *(.exit.text)
  70. *(.exit.data)
  71. *(.exitcall.exit)
  72. }
  73. .text : { /* Real text segment */
  74. _text = .; /* Text and read-only data */
  75. *(.text)
  76. SCHED_TEXT
  77. LOCK_TEXT
  78. *(.fixup)
  79. *(.gnu.warning)
  80. *(.rodata)
  81. *(.rodata.*)
  82. *(.glue_7)
  83. *(.glue_7t)
  84. *(.got) /* Global offset table */
  85. }
  86. . = ALIGN(16);
  87. __ex_table : { /* Exception table */
  88. __start___ex_table = .;
  89. *(__ex_table)
  90. __stop___ex_table = .;
  91. }
  92. RODATA
  93. _etext = .; /* End of text and rodata section */
  94. #ifdef CONFIG_XIP_KERNEL
  95. __data_loc = ALIGN(4); /* location in binary */
  96. . = DATAADDR;
  97. #else
  98. . = ALIGN(8192);
  99. __data_loc = .;
  100. #endif
  101. .data : AT(__data_loc) {
  102. __data_start = .; /* address in memory */
  103. /*
  104. * first, the init task union, aligned
  105. * to an 8192 byte boundary.
  106. */
  107. *(.init.task)
  108. #ifdef CONFIG_XIP_KERNEL
  109. . = ALIGN(4096);
  110. __init_begin = .;
  111. *(.init.data)
  112. . = ALIGN(4096);
  113. __init_end = .;
  114. #endif
  115. . = ALIGN(4096);
  116. __nosave_begin = .;
  117. *(.data.nosave)
  118. . = ALIGN(4096);
  119. __nosave_end = .;
  120. /*
  121. * then the cacheline aligned data
  122. */
  123. . = ALIGN(32);
  124. *(.data.cacheline_aligned)
  125. /*
  126. * and the usual data section
  127. */
  128. *(.data)
  129. CONSTRUCTORS
  130. _edata = .;
  131. }
  132. .bss : {
  133. __bss_start = .; /* BSS */
  134. *(.bss)
  135. *(COMMON)
  136. _end = .;
  137. }
  138. /* Stabs debugging sections. */
  139. .stab 0 : { *(.stab) }
  140. .stabstr 0 : { *(.stabstr) }
  141. .stab.excl 0 : { *(.stab.excl) }
  142. .stab.exclstr 0 : { *(.stab.exclstr) }
  143. .stab.index 0 : { *(.stab.index) }
  144. .stab.indexstr 0 : { *(.stab.indexstr) }
  145. .comment 0 : { *(.comment) }
  146. }
  147. /* those must never be empty */
  148. ASSERT((__proc_info_end - __proc_info_begin), "missing CPU support")
  149. ASSERT((__arch_info_end - __arch_info_begin), "no machine record defined")