fm3_rom.ld 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122
  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. _etext = .;
  34. } > CODE = 0
  35. /* .ARM.exidx is sorted, so has to go in its own output section. */
  36. __exidx_start = .;
  37. .ARM.exidx :
  38. {
  39. *(.ARM.exidx* .gnu.linkonce.armexidx.*)
  40. /* This is used by the startup in order to initialize the .data secion */
  41. _sidata = .;
  42. } > CODE
  43. __exidx_end = .;
  44. /* .data section which is used for initialized data */
  45. .data : AT (_sidata)
  46. {
  47. . = ALIGN(4);
  48. /* This is used by the startup in order to initialize the .data secion */
  49. _sdata = . ;
  50. *(.data)
  51. *(.data.*)
  52. *(.gnu.linkonce.d*)
  53. . = ALIGN(4);
  54. /* This is used by the startup in order to initialize the .data secion */
  55. _edata = . ;
  56. } >DATA
  57. __bss_start = .;
  58. .bss :
  59. {
  60. . = ALIGN(4);
  61. /* This is used by the startup in order to initialize the .bss secion */
  62. _sbss = .;
  63. *(.bss)
  64. *(.bss.*)
  65. *(COMMON)
  66. . = ALIGN(4);
  67. /* This is used by the startup in order to initialize the .bss secion */
  68. _ebss = . ;
  69. _estack = .;
  70. *(.bss.init)
  71. } > DATA
  72. __bss_end = .;
  73. _end = .;
  74. /* Stabs debugging sections. */
  75. .stab 0 : { *(.stab) }
  76. .stabstr 0 : { *(.stabstr) }
  77. .stab.excl 0 : { *(.stab.excl) }
  78. .stab.exclstr 0 : { *(.stab.exclstr) }
  79. .stab.index 0 : { *(.stab.index) }
  80. .stab.indexstr 0 : { *(.stab.indexstr) }
  81. .comment 0 : { *(.comment) }
  82. /* DWARF debug sections.
  83. * Symbols in the DWARF debugging sections are relative to the beginning
  84. * of the section so we begin them at 0. */
  85. /* DWARF 1 */
  86. .debug 0 : { *(.debug) }
  87. .line 0 : { *(.line) }
  88. /* GNU DWARF 1 extensions */
  89. .debug_srcinfo 0 : { *(.debug_srcinfo) }
  90. .debug_sfnames 0 : { *(.debug_sfnames) }
  91. /* DWARF 1.1 and DWARF 2 */
  92. .debug_aranges 0 : { *(.debug_aranges) }
  93. .debug_pubnames 0 : { *(.debug_pubnames) }
  94. /* DWARF 2 */
  95. .debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) }
  96. .debug_abbrev 0 : { *(.debug_abbrev) }
  97. .debug_line 0 : { *(.debug_line) }
  98. .debug_frame 0 : { *(.debug_frame) }
  99. .debug_str 0 : { *(.debug_str) }
  100. .debug_loc 0 : { *(.debug_loc) }
  101. .debug_macinfo 0 : { *(.debug_macinfo) }
  102. /* SGI/MIPS DWARF 2 extensions */
  103. .debug_weaknames 0 : { *(.debug_weaknames) }
  104. .debug_funcnames 0 : { *(.debug_funcnames) }
  105. .debug_typenames 0 : { *(.debug_typenames) }
  106. .debug_varnames 0 : { *(.debug_varnames) }
  107. }