fm3_rom.ld 3.6 KB

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