vmlinux.lds.S 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205
  1. /*
  2. * File: arch/blackfin/kernel/vmlinux.lds.S
  3. * Based on: none - original work
  4. * Author:
  5. *
  6. * Created: Tue Sep 21 2004
  7. * Description: Master linker script for blackfin architecture
  8. *
  9. * Modified:
  10. * Copyright 2004-2007 Analog Devices Inc.
  11. *
  12. * Bugs: Enter bugs at http://blackfin.uclinux.org/
  13. *
  14. * This program is free software; you can redistribute it and/or modify
  15. * it under the terms of the GNU General Public License as published by
  16. * the Free Software Foundation; either version 2 of the License, or
  17. * (at your option) any later version.
  18. *
  19. * This program is distributed in the hope that it will be useful,
  20. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  21. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  22. * GNU General Public License for more details.
  23. *
  24. * You should have received a copy of the GNU General Public License
  25. * along with this program; if not, see the file COPYING, or write
  26. * to the Free Software Foundation, Inc.,
  27. * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
  28. */
  29. #define VMLINUX_SYMBOL(_sym_) _##_sym_
  30. #include <asm-generic/vmlinux.lds.h>
  31. #include <asm/mem_map.h>
  32. #include <asm/page.h>
  33. #include <asm/thread_info.h>
  34. OUTPUT_FORMAT("elf32-bfin")
  35. ENTRY(__start)
  36. _jiffies = _jiffies_64;
  37. SECTIONS
  38. {
  39. . = CONFIG_BOOT_LOAD;
  40. .text :
  41. {
  42. __text = .;
  43. _text = .;
  44. __stext = .;
  45. TEXT_TEXT
  46. SCHED_TEXT
  47. LOCK_TEXT
  48. KPROBES_TEXT
  49. *(.text.*)
  50. *(.fixup)
  51. . = ALIGN(16);
  52. ___start___ex_table = .;
  53. *(__ex_table)
  54. ___stop___ex_table = .;
  55. . = ALIGN(4);
  56. __etext = .;
  57. }
  58. RO_DATA(PAGE_SIZE)
  59. .data :
  60. {
  61. /* make sure the init_task is aligned to the
  62. * kernel thread size so we can locate the kernel
  63. * stack properly and quickly.
  64. */
  65. __sdata = .;
  66. . = ALIGN(THREAD_SIZE);
  67. *(.data.init_task)
  68. . = ALIGN(32);
  69. *(.data.cacheline_aligned)
  70. DATA_DATA
  71. *(.data.*)
  72. CONSTRUCTORS
  73. . = ALIGN(THREAD_SIZE);
  74. __edata = .;
  75. }
  76. ___init_begin = .;
  77. .init.text :
  78. {
  79. . = ALIGN(PAGE_SIZE);
  80. __sinittext = .;
  81. *(.init.text)
  82. __einittext = .;
  83. }
  84. .init.data :
  85. {
  86. . = ALIGN(16);
  87. *(.init.data)
  88. }
  89. .init.setup :
  90. {
  91. . = ALIGN(16);
  92. ___setup_start = .;
  93. *(.init.setup)
  94. ___setup_end = .;
  95. }
  96. .initcall.init :
  97. {
  98. ___initcall_start = .;
  99. INITCALLS
  100. ___initcall_end = .;
  101. }
  102. .con_initcall.init :
  103. {
  104. ___con_initcall_start = .;
  105. *(.con_initcall.init)
  106. ___con_initcall_end = .;
  107. }
  108. SECURITY_INIT
  109. .init.ramfs :
  110. {
  111. . = ALIGN(4);
  112. ___initramfs_start = .;
  113. *(.init.ramfs)
  114. ___initramfs_end = .;
  115. }
  116. __l1_lma_start = .;
  117. .text_l1 L1_CODE_START : AT(LOADADDR(.init.ramfs) + SIZEOF(.init.ramfs))
  118. {
  119. . = ALIGN(4);
  120. __stext_l1 = .;
  121. *(.l1.text)
  122. . = ALIGN(4);
  123. __etext_l1 = .;
  124. }
  125. .data_l1 L1_DATA_A_START : AT(LOADADDR(.text_l1) + SIZEOF(.text_l1))
  126. {
  127. . = ALIGN(4);
  128. __sdata_l1 = .;
  129. *(.l1.data)
  130. __edata_l1 = .;
  131. . = ALIGN(4);
  132. __sbss_l1 = .;
  133. *(.l1.bss)
  134. . = ALIGN(32);
  135. *(.data_l1.cacheline_aligned)
  136. . = ALIGN(4);
  137. __ebss_l1 = .;
  138. }
  139. .data_b_l1 L1_DATA_B_START : AT(LOADADDR(.data_l1) + SIZEOF(.data_l1))
  140. {
  141. . = ALIGN(4);
  142. __sdata_b_l1 = .;
  143. *(.l1.data.B)
  144. __edata_b_l1 = .;
  145. . = ALIGN(4);
  146. __sbss_b_l1 = .;
  147. *(.l1.bss.B)
  148. . = ALIGN(4);
  149. __ebss_b_l1 = .;
  150. }
  151. /* Force trailing alignment of our init section so that when we
  152. * free our init memory, we don't leave behind a partial page.
  153. */
  154. . = LOADADDR(.data_b_l1) + SIZEOF(.data_b_l1);
  155. . = ALIGN(PAGE_SIZE);
  156. ___init_end = .;
  157. .bss :
  158. {
  159. . = ALIGN(4);
  160. ___bss_start = .;
  161. *(.bss .bss.*)
  162. *(COMMON)
  163. . = ALIGN(4);
  164. ___bss_stop = .;
  165. __end = .;
  166. }
  167. STABS_DEBUG
  168. DWARF_DEBUG
  169. NOTES
  170. /DISCARD/ :
  171. {
  172. *(.exit.text)
  173. *(.exit.data)
  174. *(.exitcall.exit)
  175. }
  176. }