vmlinux.lds.S 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229
  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-2006 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. OUTPUT_FORMAT("elf32-bfin")
  33. ENTRY(__start)
  34. _jiffies = _jiffies_64;
  35. MEMORY
  36. {
  37. ram : ORIGIN = CONFIG_BOOT_LOAD, LENGTH = (CONFIG_MEM_SIZE * 1024 * 1024) - (CONFIG_BOOT_LOAD)
  38. l1_data_a : ORIGIN = L1_DATA_A_START, LENGTH = L1_DATA_A_LENGTH
  39. l1_data_b : ORIGIN = L1_DATA_B_START, LENGTH = L1_DATA_B_LENGTH
  40. l1_code : ORIGIN = L1_CODE_START, LENGTH = L1_CODE_LENGTH
  41. l1_scratch : ORIGIN = L1_SCRATCH_START, LENGTH = L1_SCRATCH_LENGTH
  42. }
  43. SECTIONS
  44. {
  45. . = CONFIG_BOOT_LOAD;
  46. .text :
  47. {
  48. __text = .;
  49. _text = .;
  50. __stext = .;
  51. TEXT_TEXT
  52. SCHED_TEXT
  53. *(.text.lock)
  54. . = ALIGN(16);
  55. ___start___ex_table = .;
  56. *(__ex_table)
  57. ___stop___ex_table = .;
  58. *($code)
  59. *(.rodata)
  60. *(.rodata.*)
  61. *(__vermagic) /* Kernel version magic */
  62. *(.rodata1)
  63. *(.fixup)
  64. *(.spinlock.text)
  65. /* Kernel symbol table: Normal symbols */
  66. . = ALIGN(4);
  67. ___start___ksymtab = .;
  68. *(__ksymtab)
  69. ___stop___ksymtab = .;
  70. /* Kernel symbol table: GPL-only symbols */
  71. ___start___ksymtab_gpl = .;
  72. *(__ksymtab_gpl)
  73. ___stop___ksymtab_gpl = .;
  74. /* Kernel symbol table: Normal unused symbols */ \
  75. ___start___ksymtab_unused = .;
  76. *(__ksymtab_unused)
  77. ___stop___ksymtab_unused = .;
  78. /* Kernel symbol table: GPL-only unused symbols */
  79. ___start___ksymtab_unused_gpl = .;
  80. *(__ksymtab_unused_gpl)
  81. ___stop___ksymtab_unused_gpl = .;
  82. /* Kernel symbol table: GPL-future symbols */
  83. ___start___ksymtab_gpl_future = .;
  84. *(__ksymtab_gpl_future)
  85. ___stop___ksymtab_gpl_future = .;
  86. /* Kernel symbol table: Normal symbols */
  87. ___start___kcrctab = .;
  88. *(__kcrctab)
  89. ___stop___kcrctab = .;
  90. /* Kernel symbol table: GPL-only symbols */
  91. ___start___kcrctab_gpl = .;
  92. *(__kcrctab_gpl)
  93. ___stop___kcrctab_gpl = .;
  94. /* Kernel symbol table: GPL-future symbols */
  95. ___start___kcrctab_gpl_future = .;
  96. *(__kcrctab_gpl_future)
  97. ___stop___kcrctab_gpl_future = .;
  98. /* Kernel symbol table: strings */
  99. *(__ksymtab_strings)
  100. . = ALIGN(4);
  101. __etext = .;
  102. } > ram
  103. .init :
  104. {
  105. . = ALIGN(4096);
  106. ___init_begin = .;
  107. __sinittext = .;
  108. *(.init.text)
  109. __einittext = .;
  110. *(.init.data)
  111. . = ALIGN(16);
  112. ___setup_start = .;
  113. *(.init.setup)
  114. ___setup_end = .;
  115. ___start___param = .;
  116. *(__param)
  117. ___stop___param = .;
  118. ___initcall_start = .;
  119. INITCALLS
  120. ___initcall_end = .;
  121. ___con_initcall_start = .;
  122. *(.con_initcall.init)
  123. ___con_initcall_end = .;
  124. ___security_initcall_start = .;
  125. *(.security_initcall.init)
  126. ___security_initcall_end = .;
  127. . = ALIGN(4);
  128. ___initramfs_start = .;
  129. *(.init.ramfs)
  130. ___initramfs_end = .;
  131. . = ALIGN(4);
  132. ___init_end = .;
  133. } > ram
  134. __l1_lma_start = .;
  135. .text_l1 :
  136. {
  137. . = ALIGN(4);
  138. __stext_l1 = .;
  139. *(.l1.text)
  140. . = ALIGN(4);
  141. __etext_l1 = .;
  142. } > l1_code AT > ram
  143. .data_l1 :
  144. {
  145. . = ALIGN(4);
  146. __sdata_l1 = .;
  147. *(.l1.data)
  148. __edata_l1 = .;
  149. . = ALIGN(4);
  150. __sbss_l1 = .;
  151. *(.l1.bss)
  152. . = ALIGN(32);
  153. *(.data_l1.cacheline_aligned)
  154. . = ALIGN(4);
  155. __ebss_l1 = .;
  156. } > l1_data_a AT > ram
  157. .data_b_l1 :
  158. {
  159. . = ALIGN(4);
  160. __sdata_b_l1 = .;
  161. *(.l1.data.B)
  162. __edata_b_l1 = .;
  163. . = ALIGN(4);
  164. __sbss_b_l1 = .;
  165. *(.l1.bss.B)
  166. . = ALIGN(4);
  167. __ebss_b_l1 = .;
  168. } > l1_data_b AT > ram
  169. .data :
  170. {
  171. __sdata = .;
  172. . = ALIGN(0x2000);
  173. *(.data.init_task)
  174. DATA_DATA
  175. . = ALIGN(32);
  176. *(.data.cacheline_aligned)
  177. . = ALIGN(0x2000);
  178. __edata = .;
  179. } > ram
  180. /DISCARD/ : { /* Exit code and data*/
  181. *(.exit.text)
  182. *(.exit.data)
  183. *(.exitcall.exit)
  184. } > ram
  185. .bss :
  186. {
  187. . = ALIGN(4);
  188. ___bss_start = .;
  189. *(.bss)
  190. *(COMMON)
  191. . = ALIGN(4);
  192. ___bss_stop = .;
  193. __end = . ;
  194. } > ram
  195. }