u-boot.lds.S 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124
  1. /*
  2. * U-boot - u-boot.lds.S
  3. *
  4. * Copyright (c) 2005-2008 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. #include <asm/blackfin.h>
  29. #undef ALIGN
  30. #undef ENTRY
  31. #undef bfin
  32. /* If we don't actually load anything into L1 data, this will avoid
  33. * a syntax error. If we do actually load something into L1 data,
  34. * we'll get a linker memory load error (which is what we'd want).
  35. * This is here in the first place so we can quickly test building
  36. * for different CPU's which may lack non-cache L1 data.
  37. */
  38. #ifndef L1_DATA_B_SRAM
  39. # define L1_DATA_B_SRAM CONFIG_SYS_MONITOR_BASE
  40. # define L1_DATA_B_SRAM_SIZE 0
  41. #endif
  42. OUTPUT_ARCH(bfin)
  43. MEMORY
  44. {
  45. ram : ORIGIN = CONFIG_SYS_MONITOR_BASE, LENGTH = CONFIG_SYS_MONITOR_LEN
  46. l1_code : ORIGIN = L1_INST_SRAM, LENGTH = L1_INST_SRAM_SIZE
  47. l1_data : ORIGIN = L1_DATA_B_SRAM, LENGTH = L1_DATA_B_SRAM_SIZE
  48. }
  49. ENTRY(_start)
  50. SECTIONS
  51. {
  52. .text :
  53. {
  54. cpu/blackfin/start.o (.text .text.*)
  55. __initcode_start = .;
  56. cpu/blackfin/initcode.o (.text .text.*)
  57. __initcode_end = .;
  58. *(.text .text.*)
  59. } >ram
  60. .rodata :
  61. {
  62. . = ALIGN(4);
  63. *(.rodata .rodata.*)
  64. *(.rodata1)
  65. *(.eh_frame)
  66. . = ALIGN(4);
  67. } >ram
  68. .data :
  69. {
  70. . = ALIGN(256);
  71. *(.data .data.*)
  72. *(.data1)
  73. *(.sdata)
  74. *(.sdata2)
  75. *(.dynamic)
  76. CONSTRUCTORS
  77. } >ram
  78. .u_boot_cmd :
  79. {
  80. ___u_boot_cmd_start = .;
  81. *(.u_boot_cmd)
  82. ___u_boot_cmd_end = .;
  83. } >ram
  84. .text_l1 :
  85. {
  86. . = ALIGN(4);
  87. __stext_l1 = .;
  88. *(.l1.text)
  89. . = ALIGN(4);
  90. __etext_l1 = .;
  91. } >l1_code AT>ram
  92. __stext_l1_lma = LOADADDR(.text_l1);
  93. .data_l1 :
  94. {
  95. . = ALIGN(4);
  96. __sdata_l1 = .;
  97. *(.l1.data)
  98. *(.l1.bss)
  99. . = ALIGN(4);
  100. __edata_l1 = .;
  101. } >l1_data AT>ram
  102. __sdata_l1_lma = LOADADDR(.data_l1);
  103. .bss :
  104. {
  105. . = ALIGN(4);
  106. __bss_start = .;
  107. *(.sbss) *(.scommon)
  108. *(.dynbss)
  109. *(.bss .bss.*)
  110. *(COMMON)
  111. __bss_end = .;
  112. } >ram
  113. }