jz47xx_ram.lds 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154
  1. /*
  2. * File : jz47xx_ram.lds
  3. * This file is part of RT-Thread RTOS
  4. * COPYRIGHT (C) 2010, RT-Thread Development Team
  5. *
  6. * The license and distribution terms for this file may be
  7. * found in the file LICENSE in this distribution or at
  8. * http://www.rt-thread.org/license/LICENSE
  9. *
  10. * Change Logs:
  11. * Date Author Notes
  12. * 2010-05-17 swkyer first version
  13. * 2010-08-23 bernard change to jz47xx
  14. * 2010-09-04 bernard move the beginning entry to 0x80100000
  15. */
  16. OUTPUT_FORMAT("elf32-tradlittlemips", "elf32-tradlittlemips", "elf32-tradlittlemips")
  17. OUTPUT_ARCH(mips)
  18. MEMORY
  19. {
  20. /* 16M SDRAM */
  21. DRAM : ORIGIN = 0x80100000, LENGTH = 0x01000000
  22. /* 16K SRAM */
  23. IRAM : ORIGIN = 0x80000000, LENGTH = 0x00004000
  24. }
  25. ENTRY(_start)
  26. SECTIONS
  27. {
  28. . = 0x80100000 ;
  29. .start :
  30. {
  31. *(.start);
  32. } > DRAM
  33. . = ALIGN(4);
  34. .text :
  35. {
  36. *(.text)
  37. *(.text.*)
  38. *(.rodata)
  39. *(.rodata.*)
  40. *(.rodata1)
  41. *(.rodata1.*)
  42. /* section information for finsh shell */
  43. . = ALIGN(4);
  44. __fsymtab_start = .;
  45. KEEP(*(FSymTab))
  46. __fsymtab_end = .;
  47. . = ALIGN(4);
  48. __vsymtab_start = .;
  49. KEEP(*(VSymTab))
  50. __vsymtab_end = .;
  51. . = ALIGN(4);
  52. } > DRAM
  53. . = ALIGN(4);
  54. .data :
  55. {
  56. *(.data)
  57. *(.data.*)
  58. *(.data1)
  59. *(.data1.*)
  60. . = ALIGN(8);
  61. _gp = ABSOLUTE(.); /* Base of small data */
  62. *(.sdata)
  63. *(.sdata.*)
  64. } > DRAM
  65. . = ALIGN(4);
  66. _iramat = .;
  67. .iram : AT(_iramat)
  68. {
  69. _iramstart = .;
  70. *(.vectors.1);
  71. . = 0x100;
  72. *(.vectors.2);
  73. . = 0x180;
  74. *(.vectors.3);
  75. . = 0x200;
  76. *(.vectors.4);
  77. *(.vectors);
  78. *(.icode);
  79. *(.irodata);
  80. *(.idata);
  81. KEEP(*(.vectors*))
  82. _iramend = .;
  83. } > IRAM
  84. _iramcopy = LOADADDR(.iram);
  85. .sbss :
  86. {
  87. __bss_start = .;
  88. *(.sbss)
  89. *(.sbss.*)
  90. *(.dynsbss)
  91. *(.scommon)
  92. } > DRAM
  93. .bss :
  94. {
  95. *(.bss)
  96. *(.bss.*)
  97. *(.dynbss)
  98. *(COMMON)
  99. __bss_end = .;
  100. } > DRAM
  101. _end = .;
  102. /* Stabs debugging sections. */
  103. .stab 0 : { *(.stab) }
  104. .stabstr 0 : { *(.stabstr) }
  105. .stab.excl 0 : { *(.stab.excl) }
  106. .stab.exclstr 0 : { *(.stab.exclstr) }
  107. .stab.index 0 : { *(.stab.index) }
  108. .stab.indexstr 0 : { *(.stab.indexstr) }
  109. .comment 0 : { *(.comment) }
  110. /* DWARF debug sections.
  111. * Symbols in the DWARF debugging sections are relative to the beginning
  112. * of the section so we begin them at 0. */
  113. /* DWARF 1 */
  114. .debug 0 : { *(.debug) }
  115. .line 0 : { *(.line) }
  116. /* GNU DWARF 1 extensions */
  117. .debug_srcinfo 0 : { *(.debug_srcinfo) }
  118. .debug_sfnames 0 : { *(.debug_sfnames) }
  119. /* DWARF 1.1 and DWARF 2 */
  120. .debug_aranges 0 : { *(.debug_aranges) }
  121. .debug_pubnames 0 : { *(.debug_pubnames) }
  122. /* DWARF 2 */
  123. .debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) }
  124. .debug_abbrev 0 : { *(.debug_abbrev) }
  125. .debug_line 0 : { *(.debug_line) }
  126. .debug_frame 0 : { *(.debug_frame) }
  127. .debug_str 0 : { *(.debug_str) }
  128. .debug_loc 0 : { *(.debug_loc) }
  129. .debug_macinfo 0 : { *(.debug_macinfo) }
  130. /* SGI/MIPS DWARF 2 extensions */
  131. .debug_weaknames 0 : { *(.debug_weaknames) }
  132. .debug_funcnames 0 : { *(.debug_funcnames) }
  133. .debug_typenames 0 : { *(.debug_typenames) }
  134. .debug_varnames 0 : { *(.debug_varnames) }
  135. }