fm3_rom.ld 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133
  1. /* Program Entry, set to mark it as "used" and avoid gc */
  2. MEMORY
  3. {
  4. CODE (rx) : ORIGIN = 0x00000000, LENGTH = 0x00040000
  5. DATA (rw) : ORIGIN = 0x1FFFC000, LENGTH = 0x0000C000
  6. }
  7. ENTRY(Reset_Handler)
  8. _system_stack_size = 0x200;
  9. SECTIONS
  10. {
  11. .text :
  12. {
  13. . = ALIGN(4);
  14. KEEP(*(.isr_vector)) /* Startup code */
  15. . = ALIGN(4);
  16. *(.text) /* remaining code */
  17. *(.text.*) /* remaining code */
  18. *(.rodata) /* read-only data (constants) */
  19. *(.rodata*)
  20. *(.glue_7)
  21. *(.glue_7t)
  22. *(.gnu.linkonce.t*)
  23. /* section information for finsh shell */
  24. . = ALIGN(4);
  25. __fsymtab_start = .;
  26. KEEP(*(FSymTab))
  27. __fsymtab_end = .;
  28. . = ALIGN(4);
  29. __vsymtab_start = .;
  30. KEEP(*(VSymTab))
  31. __vsymtab_end = .;
  32. . = ALIGN(4);
  33. . = ALIGN(4);
  34. __rt_init_start = .;
  35. KEEP(*(SORT(.rti_fn*)))
  36. __rt_init_end = .;
  37. . = ALIGN(4);
  38. . = ALIGN(4);
  39. _etext = .;
  40. } > CODE = 0
  41. /* .ARM.exidx is sorted, so has to go in its own output section. */
  42. __exidx_start = .;
  43. .ARM.exidx :
  44. {
  45. *(.ARM.exidx* .gnu.linkonce.armexidx.*)
  46. /* This is used by the startup in order to initialize the .data secion */
  47. _sidata = .;
  48. } > CODE
  49. __exidx_end = .;
  50. /* .data section which is used for initialized data */
  51. .data : AT (_sidata)
  52. {
  53. . = ALIGN(4);
  54. /* This is used by the startup in order to initialize the .data secion */
  55. _sdata = . ;
  56. *(.data)
  57. *(.data.*)
  58. *(.gnu.linkonce.d*)
  59. . = ALIGN(4);
  60. /* This is used by the startup in order to initialize the .data secion */
  61. _edata = . ;
  62. } >DATA
  63. .stack :
  64. {
  65. . = . + _system_stack_size;
  66. . = ALIGN(4);
  67. _estack = .;
  68. } >DATA
  69. __bss_start = .;
  70. .bss :
  71. {
  72. . = ALIGN(4);
  73. /* This is used by the startup in order to initialize the .bss secion */
  74. _sbss = .;
  75. *(.bss)
  76. *(.bss.*)
  77. *(COMMON)
  78. . = ALIGN(4);
  79. /* This is used by the startup in order to initialize the .bss secion */
  80. _ebss = . ;
  81. } > DATA
  82. __bss_end = .;
  83. _end = .;
  84. /* Stabs debugging sections. */
  85. .stab 0 : { *(.stab) }
  86. .stabstr 0 : { *(.stabstr) }
  87. .stab.excl 0 : { *(.stab.excl) }
  88. .stab.exclstr 0 : { *(.stab.exclstr) }
  89. .stab.index 0 : { *(.stab.index) }
  90. .stab.indexstr 0 : { *(.stab.indexstr) }
  91. .comment 0 : { *(.comment) }
  92. /* DWARF debug sections.
  93. * Symbols in the DWARF debugging sections are relative to the beginning
  94. * of the section so we begin them at 0. */
  95. /* DWARF 1 */
  96. .debug 0 : { *(.debug) }
  97. .line 0 : { *(.line) }
  98. /* GNU DWARF 1 extensions */
  99. .debug_srcinfo 0 : { *(.debug_srcinfo) }
  100. .debug_sfnames 0 : { *(.debug_sfnames) }
  101. /* DWARF 1.1 and DWARF 2 */
  102. .debug_aranges 0 : { *(.debug_aranges) }
  103. .debug_pubnames 0 : { *(.debug_pubnames) }
  104. /* DWARF 2 */
  105. .debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) }
  106. .debug_abbrev 0 : { *(.debug_abbrev) }
  107. .debug_line 0 : { *(.debug_line) }
  108. .debug_frame 0 : { *(.debug_frame) }
  109. .debug_str 0 : { *(.debug_str) }
  110. .debug_loc 0 : { *(.debug_loc) }
  111. .debug_macinfo 0 : { *(.debug_macinfo) }
  112. /* SGI/MIPS DWARF 2 extensions */
  113. .debug_weaknames 0 : { *(.debug_weaknames) }
  114. .debug_funcnames 0 : { *(.debug_funcnames) }
  115. .debug_typenames 0 : { *(.debug_typenames) }
  116. .debug_varnames 0 : { *(.debug_varnames) }
  117. }