gbaxport2.ld 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146
  1. /*
  2. * Copyright (C) 2004 by egnite Software GmbH. All rights reserved.
  3. *
  4. * Redistribution and use in source and binary forms, with or without
  5. * modification, are permitted provided that the following conditions
  6. * are met:
  7. *
  8. * 1. Redistributions of source code must retain the above copyright
  9. * notice, this list of conditions and the following disclaimer.
  10. * 2. Redistributions in binary form must reproduce the above copyright
  11. * notice, this list of conditions and the following disclaimer in the
  12. * documentation and/or other materials provided with the distribution.
  13. * 3. Neither the name of the copyright holders nor the names of
  14. * contributors may be used to endorse or promote products derived
  15. * from this software without specific prior written permission.
  16. *
  17. * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
  18. * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
  19. * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
  20. * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
  21. * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
  22. * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
  23. * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
  24. * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
  25. * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  26. * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
  27. * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  28. * SUCH DAMAGE.
  29. *
  30. * For additional information see http://www.ethernut.de/
  31. */
  32. /*
  33. * $Log$
  34. * Revision 1.1 2004/10/17 15:14:23 haraldkipp
  35. * Added Nintendo Game Boy Advance with Xport 2.0 from Charmed Labs.
  36. *
  37. */
  38. ENTRY(_start)
  39. STARTUP(crtgbaxport2.o)
  40. OUTPUT_FORMAT("elf32-littlearm", "elf32-bigarm", "elf32-littlearm")
  41. OUTPUT_ARCH(arm)
  42. __sp_usr = 0x3008000 - 0x100;
  43. __sp_irq = 0x3008000 - 0x60;
  44. MEMORY {
  45. /* 16kB System ROM */
  46. sysrom : ORIGIN = 0x00000000, LENGTH = 0x4000
  47. /* 256kB External Work RAM */
  48. ram : ORIGIN = 0x02000000, LENGTH = 0x40000
  49. /* 32kB Internal Work RAM */
  50. iwram : ORIGIN = 0x03000000, LENGTH = 0x8000
  51. /* 256kB XPORT Flash ROM */
  52. rom : ORIGIN = 0x08000000, LENGTH = 0x400000
  53. }
  54. SECTIONS
  55. {
  56. .text 0x8000000 :
  57. {
  58. _stext = ABSOLUTE(.);
  59. PROVIDE (__stext = ABSOLUTE(.));
  60. *(.text*) *(.gnu.warning) *(.gnu.linkonce*) *(.init) *(.glue_7) *(.glue_7t)
  61. } > rom
  62. _etext = .; PROVIDE (__etext = .);
  63. .fini ALIGN(4) :
  64. {
  65. . = . ;
  66. *(.fini)
  67. } > rom
  68. .rodata ALIGN(4) :
  69. {
  70. . = . ;
  71. *(.rodata*)
  72. } > rom
  73. .rodata1 ALIGN(4) :
  74. {
  75. . = . ;
  76. *(.rodata1)
  77. } > rom
  78. .fixup ALIGN(4) :
  79. {
  80. . = . ;
  81. *(.fixup)
  82. } > rom
  83. .eh_frame ALIGN(4):
  84. {
  85. KEEP (*(.eh_frame))
  86. } > rom
  87. .gcc_except_table ALIGN (0x4) :
  88. {
  89. . = . ;
  90. *(.gcc_except_table)
  91. } > rom
  92. .data 0x2000000 : AT ((LOADADDR ( .gcc_except_table ) + SIZEOF ( .gcc_except_table ) + 4 - 1) & ~ (4 - 1))
  93. {
  94. __ram_data_start = ABSOLUTE (.);
  95. *(.data*) *(.data1)
  96. _GOT1_START_ = ABSOLUTE (.);
  97. *(.got1)
  98. _GOT1_END_ = ABSOLUTE (.);
  99. _GOT2_START_ = ABSOLUTE (.);
  100. *(.got2)
  101. _GOT2_END_ = ABSOLUTE (.);
  102. . = ALIGN (4);
  103. __CTOR_LIST__ = ABSOLUTE (.);
  104. KEEP (*(SORT (.ctors*)))
  105. __CTOR_END__ = ABSOLUTE (.);
  106. __DTOR_LIST__ = ABSOLUTE (.);
  107. KEEP (*(SORT (.dtors*)))
  108. __DTOR_END__ = ABSOLUTE (.);
  109. *(.dynamic) *(.sdata*) *(.sbss*)
  110. . = ALIGN (4);
  111. *(.2ram.*)
  112. } > ram
  113. __rom_data_start = LOADADDR (.data);
  114. __ram_data_end = .;
  115. PROVIDE (__ram_data_end = .);
  116. _edata = .; PROVIDE (edata = .);
  117. PROVIDE (__rom_data_end = LOADADDR (.data) + SIZEOF(.data));
  118. .bss ALIGN(4) :
  119. {
  120. __bss_start = ABSOLUTE (.);
  121. *(.scommon) *(.dynbss) *(.bss*) *(COMMON)
  122. . = ALIGN(8);
  123. __bss_end = ABSOLUTE (.);
  124. PROVIDE (__heap_start = .);
  125. } > ram
  126. __heap1 = ALIGN(8);
  127. . = ALIGN(4);
  128. _end = .;
  129. PROVIDE (end = .);
  130. }