vmlinux.lds.S 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182
  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.*)
  46. TEXT_TEXT
  47. SCHED_TEXT
  48. LOCK_TEXT
  49. *(.text.lock)
  50. *(.fixup)
  51. . = ALIGN(16);
  52. ___start___ex_table = .;
  53. *(__ex_table)
  54. ___stop___ex_table = .;
  55. . = ALIGN(4);
  56. __etext = .;
  57. }
  58. RODATA
  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. DATA_DATA
  69. *(.data.*)
  70. CONSTRUCTORS
  71. . = ALIGN(32);
  72. *(.data.cacheline_aligned)
  73. . = ALIGN(THREAD_SIZE);
  74. __edata = .;
  75. }
  76. ___init_begin = .;
  77. .init :
  78. {
  79. . = ALIGN(PAGE_SIZE);
  80. __sinittext = .;
  81. *(.init.text)
  82. __einittext = .;
  83. *(.init.data)
  84. . = ALIGN(16);
  85. ___setup_start = .;
  86. *(.init.setup)
  87. ___setup_end = .;
  88. ___start___param = .;
  89. *(__param)
  90. ___stop___param = .;
  91. ___initcall_start = .;
  92. INITCALLS
  93. ___initcall_end = .;
  94. ___con_initcall_start = .;
  95. *(.con_initcall.init)
  96. ___con_initcall_end = .;
  97. ___security_initcall_start = .;
  98. *(.security_initcall.init)
  99. ___security_initcall_end = .;
  100. . = ALIGN(4);
  101. ___initramfs_start = .;
  102. *(.init.ramfs)
  103. ___initramfs_end = .;
  104. . = ALIGN(4);
  105. }
  106. __l1_lma_start = .;
  107. .text_l1 L1_CODE_START : AT(LOADADDR(.init) + SIZEOF(.init))
  108. {
  109. . = ALIGN(4);
  110. __stext_l1 = .;
  111. *(.l1.text)
  112. . = ALIGN(4);
  113. __etext_l1 = .;
  114. }
  115. .data_l1 L1_DATA_A_START : AT(LOADADDR(.text_l1) + SIZEOF(.text_l1))
  116. {
  117. . = ALIGN(4);
  118. __sdata_l1 = .;
  119. *(.l1.data)
  120. __edata_l1 = .;
  121. . = ALIGN(4);
  122. __sbss_l1 = .;
  123. *(.l1.bss)
  124. . = ALIGN(32);
  125. *(.data_l1.cacheline_aligned)
  126. . = ALIGN(4);
  127. __ebss_l1 = .;
  128. }
  129. .data_b_l1 L1_DATA_B_START : AT(LOADADDR(.data_l1) + SIZEOF(.data_l1))
  130. {
  131. . = ALIGN(4);
  132. __sdata_b_l1 = .;
  133. *(.l1.data.B)
  134. __edata_b_l1 = .;
  135. . = ALIGN(4);
  136. __sbss_b_l1 = .;
  137. *(.l1.bss.B)
  138. . = ALIGN(4);
  139. __ebss_b_l1 = .;
  140. }
  141. ___init_end = LOADADDR(.data_b_l1) + SIZEOF(.data_b_l1);
  142. .bss LOADADDR(.data_b_l1) + SIZEOF(.data_b_l1) :
  143. {
  144. . = ALIGN(4);
  145. ___bss_start = .;
  146. *(.bss .bss.*)
  147. *(COMMON)
  148. . = ALIGN(4);
  149. ___bss_stop = .;
  150. __end = .;
  151. }
  152. /DISCARD/ :
  153. {
  154. *(.exit.text)
  155. *(.exit.data)
  156. *(.exitcall.exit)
  157. }
  158. }