at91sam7se256_xram.ld 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121
  1. /*
  2. * Copyright (C) 2008 by egnite Software GmbH
  3. * Copyright (C) 2011 by egnite GmbH
  4. *
  5. * All rights reserved.
  6. *
  7. * Redistribution and use in source and binary forms, with or without
  8. * modification, are permitted provided that the following conditions
  9. * are met:
  10. *
  11. * 1. Redistributions of source code must retain the above copyright
  12. * notice, this list of conditions and the following disclaimer.
  13. * 2. Redistributions in binary form must reproduce the above copyright
  14. * notice, this list of conditions and the following disclaimer in the
  15. * documentation and/or other materials provided with the distribution.
  16. * 3. Neither the name of the copyright holders nor the names of
  17. * contributors may be used to endorse or promote products derived
  18. * from this software without specific prior written permission.
  19. *
  20. * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
  21. * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
  22. * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
  23. * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
  24. * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
  25. * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
  26. * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
  27. * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
  28. * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  29. * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
  30. * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  31. * SUCH DAMAGE.
  32. *
  33. * For additional information see http://www.ethernut.de/
  34. */
  35. STARTUP(crtat91sam7se512_xram.o)
  36. SEARCH_DIR(.)
  37. MEMORY
  38. {
  39. iram : org = 0x00000000, len = 32k
  40. sdram : org = 0x20000000, len = 256M
  41. }
  42. REGION_ALIAS("REGION_TEXT", sdram);
  43. REGION_ALIAS("REGION_RODATA", sdram);
  44. REGION_ALIAS("REGION_DATA", sdram);
  45. REGION_ALIAS("REGION_BSS", sdram);
  46. REGION_ALIAS("REGION_RELOC", iram);
  47. SECTIONS
  48. {
  49. .text :
  50. {
  51. *(.init0);
  52. . = ALIGN(4);
  53. *(.text);
  54. . = ALIGN(4);
  55. *(.text.*);
  56. . = ALIGN(4);
  57. *(.eh_frame*);
  58. . = ALIGN(4);
  59. *(.glue_7t);
  60. . = ALIGN(4);
  61. *(.glue_7);
  62. } > REGION_TEXT
  63. . = ALIGN(4);
  64. .rodata :
  65. {
  66. . = ALIGN(4);
  67. *(.rodata*);
  68. } > REGION_RODATA
  69. . = ALIGN(4);
  70. .data :
  71. {
  72. *(.data)
  73. . = ALIGN(4);
  74. *(.data.*);
  75. . = ALIGN(4);
  76. PROVIDE (__data_end = .);
  77. } > REGION_DATA
  78. .init : AT (__data_end)
  79. {
  80. PROVIDE (__reloc_start = .);
  81. *(.vectors);
  82. . = ALIGN(4);
  83. *(.ramfunc)
  84. . = ALIGN(4);
  85. PROVIDE (__reloc_end = .);
  86. } > REGION_RELOC
  87. .bss :
  88. {
  89. . = ALIGN(4);
  90. PROVIDE (__bss_start = .);
  91. *(.bss)
  92. *(COMMON)
  93. . = ALIGN(8);
  94. PROVIDE (__bss_end = .);
  95. . += 0x400;
  96. PROVIDE (__exp_stack = .);
  97. . += 0x400;
  98. PROVIDE (__stack = .);
  99. PROVIDE (__heap_start = .);
  100. } > REGION_BSS
  101. .stab 0 (NOLOAD) :
  102. {
  103. [ .stab ]
  104. }
  105. .stabstr 0 (NOLOAD) :
  106. {
  107. [ .stabstr ]
  108. }
  109. }