vmlinux.lds.S 3.4 KB

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