vmlinux.lds.S 4.7 KB

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