u-boot.lds.S 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190
  1. /*
  2. * U-boot - u-boot.lds.S
  3. *
  4. * Copyright (c) 2005-2007 Analog Device Inc.
  5. *
  6. * (C) Copyright 2000-2004
  7. * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
  8. *
  9. * See file CREDITS for list of people who contributed to this
  10. * project.
  11. *
  12. * This program is free software; you can redistribute it and/or
  13. * modify it under the terms of the GNU General Public License as
  14. * published by the Free Software Foundation; either version 2 of
  15. * the License, or (at your option) any later version.
  16. *
  17. * This program is distributed in the hope that it will be useful,
  18. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  19. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  20. * GNU General Public License for more details.
  21. *
  22. * You should have received a copy of the GNU General Public License
  23. * along with this program; if not, write to the Free Software
  24. * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
  25. * MA 02111-1307 USA
  26. */
  27. #include <config.h>
  28. OUTPUT_ARCH(bfin)
  29. SEARCH_DIR(/lib); SEARCH_DIR(/usr/lib); SEARCH_DIR(/usr/local/lib);
  30. /* Do we need any of these for elf?
  31. __DYNAMIC = 0; */
  32. MEMORY
  33. {
  34. ram : ORIGIN = (CFG_MONITOR_BASE), LENGTH = (256 * 1024)
  35. l1_code : ORIGIN = 0xFFA00000, LENGTH = 0xC000
  36. l1_data : ORIGIN = 0xFF900000, LENGTH = 0x4000
  37. }
  38. SECTIONS
  39. {
  40. /* Read-only sections, merged into text segment: */
  41. . = + SIZEOF_HEADERS; /*0x1000;*/
  42. .interp : { *(.interp) }
  43. .hash : { *(.hash) }
  44. .dynsym : { *(.dynsym) }
  45. .dynstr : { *(.dynstr) }
  46. .rel.text : { *(.rel.text) }
  47. .rela.text : { *(.rela.text) }
  48. .rel.data : { *(.rel.data) }
  49. .rela.data : { *(.rela.data) }
  50. .rel.rodata : { *(.rel.rodata) }
  51. .rela.rodata : { *(.rela.rodata) }
  52. .rel.got : { *(.rel.got) }
  53. .rela.got : { *(.rela.got) }
  54. .rel.ctors : { *(.rel.ctors) }
  55. .rela.ctors : { *(.rela.ctors) }
  56. .rel.dtors : { *(.rel.dtors) }
  57. .rela.dtors : { *(.rela.dtors) }
  58. .rel.bss : { *(.rel.bss) }
  59. .rela.bss : { *(.rela.bss) }
  60. .rel.plt : { *(.rel.plt) }
  61. .rela.plt : { *(.rela.plt) }
  62. .init : { *(.init) }
  63. .plt : { *(.plt) }
  64. . = CFG_MONITOR_BASE;
  65. .text :
  66. {
  67. /* WARNING - the following is hand-optimized to fit within */
  68. /* the sector before the environment sector. If it throws */
  69. /* an error during compilation remove an object here to get */
  70. /* it linked after the configuration sector. */
  71. cpu/bf537/start.o (.text)
  72. cpu/bf537/start1.o (.text)
  73. cpu/bf537/traps.o (.text)
  74. cpu/bf537/interrupt.o (.text)
  75. cpu/bf537/serial.o (.text)
  76. common/dlmalloc.o (.text)
  77. /* lib_blackfin/bf533_string.o (.text) */
  78. /* lib_generic/vsprintf.o (.text) */
  79. lib_generic/crc32.o (.text)
  80. /* lib_generic/zlib.o (.text) */
  81. /* board/bf537-stamp/bf537-stamp.o (.text) */
  82. . = DEFINED(env_offset) ? env_offset : .;
  83. common/environment.o (.text)
  84. *(EXCLUDE_FILE (board/bf537-stamp/post-memory.o) .text)
  85. *(.fixup)
  86. *(.got1)
  87. } > ram
  88. _etext = .;
  89. PROVIDE (etext = .);
  90. .text_l1 :
  91. {
  92. . = ALIGN(4) ;
  93. _text_l1 = .;
  94. PROVIDE (text_l1 = .);
  95. board/bf537-stamp/post-memory.o (.text)
  96. . = ALIGN(4) ;
  97. _etext_l1 = .;
  98. PROVIDE (etext_l1 = .);
  99. } > l1_code AT > ram
  100. .rodata :
  101. {
  102. . = ALIGN(4);
  103. *(EXCLUDE_FILE (board/bf537-stamp/post-memory.o) .rodata)
  104. *(EXCLUDE_FILE (board/bf537-stamp/post-memory.o) .rodata1)
  105. *(EXCLUDE_FILE (board/bf537-stamp/post-memory.o) .rodata.str1.4)
  106. *(.eh_frame)
  107. . = ALIGN(4);
  108. } > ram
  109. . = ALIGN(4);
  110. _erodata = .;
  111. PROVIDE (erodata = .);
  112. .rodata_l1 :
  113. {
  114. . = ALIGN(4) ;
  115. _rodata_l1 = .;
  116. PROVIDE (rodata_l1 = .);
  117. board/bf537-stamp/post-memory.o (.rodata)
  118. board/bf537-stamp/post-memory.o (.rodata1)
  119. board/bf537-stamp/post-memory.o (.rodata.str1.4)
  120. . = ALIGN(4) ;
  121. _erodata_l1 = .;
  122. PROVIDE(erodata_l1 = .);
  123. } > l1_data AT > ram
  124. .fini : { *(.fini) } =0
  125. .ctors : { *(.ctors) }
  126. .dtors : { *(.dtors) }
  127. /* Read-write section, merged into data segment: */
  128. . = (. + 0x00FF) & 0xFFFFFF00;
  129. _erotext = .;
  130. PROVIDE (erotext = .);
  131. .reloc :
  132. {
  133. *(.got)
  134. _GOT2_TABLE_ = .;
  135. *(.got2)
  136. _FIXUP_TABLE_ = .;
  137. *(.fixup)
  138. }
  139. __got2_entries = (_FIXUP_TABLE_ - _GOT2_TABLE_) >>2;
  140. __fixup_entries = (. - _FIXUP_TABLE_)>>2;
  141. .data :
  142. {
  143. *(.data)
  144. *(.data1)
  145. *(.sdata)
  146. *(.sdata2)
  147. *(.dynamic)
  148. CONSTRUCTORS
  149. } > ram
  150. _edata = .;
  151. PROVIDE (edata = .);
  152. ___u_boot_cmd_start = .;
  153. .u_boot_cmd : { *(.u_boot_cmd) } > ram
  154. ___u_boot_cmd_end = .;
  155. __start___ex_table = .;
  156. __ex_table : { *(__ex_table) }
  157. __stop___ex_table = .;
  158. . = ALIGN(256);
  159. __init_begin = .;
  160. .text.init : { *(.text.init) }
  161. .data.init : { *(.data.init) }
  162. . = ALIGN(256);
  163. __init_end = .;
  164. .bss :
  165. {
  166. __bss_start = .;
  167. *(.sbss) *(.scommon)
  168. *(.dynbss)
  169. *(.bss)
  170. *(COMMON)
  171. } > ram
  172. _end = . ;
  173. PROVIDE (end = .);
  174. }