lm3x_flash.ld 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  1. /***********************************************************************************
  2. *
  3. * lm3x_flash.ld - linker script include for nutos on cotrex-m3 LM3 series
  4. *
  5. ***********************************************************************************/
  6. PROVIDE (__heap_start = _sheap);
  7. _ramend = ORIGIN(SRAM0) + LENGTH(SRAM0);
  8. SECTIONS
  9. {
  10. .text :
  11. {
  12. . = ALIGN(4);
  13. _svect = .;
  14. KEEP(*(.isr_vector))
  15. _evect = .;
  16. *(.text .text.* .gnu.linkonce.t.*)
  17. *(.glue_7)
  18. *(.glue_7t)
  19. *(.gcc_except_table)
  20. *(.rodata .rodata* .gnu.linkonce.r.*)
  21. . = ALIGN(4);
  22. _etext = .;
  23. } > FLASH0
  24. .vtable (NOLOAD):
  25. {
  26. . = ALIGN(4);
  27. _vtable = .;
  28. *(.vtable*)
  29. . = ALIGN(4);
  30. _evtable = .;
  31. } > SRAM0
  32. .data : AT (_etext)
  33. {
  34. _sdata = _evtable;
  35. *(.data .data.* .gnu.linkonce.d.*)
  36. . = ALIGN(4);
  37. _edata = .;
  38. } > SRAM0
  39. .bss :
  40. {
  41. _sbss = .;
  42. *(.bss .bss.* .gnu.linkonce.b.*)
  43. *(COMMON)
  44. . = ALIGN(4);
  45. _ebss = .;
  46. } > SRAM0
  47. .stack (NOLOAD):
  48. {
  49. . = ALIGN(8);
  50. _stack_start = .;
  51. *(.stack .stack.*)
  52. _stack_end = .;
  53. } > SRAM0
  54. .heap (NOLOAD):
  55. {
  56. . = ALIGN(8);
  57. _sheap = .;
  58. . = _ramend - .;
  59. _eheap = .;
  60. } > SRAM0
  61. end = .;
  62. DISCARD :
  63. {
  64. libc.a ( * )
  65. libm.a ( * )
  66. libgcc.a ( * )
  67. }
  68. /* Stabs debugging sections. */
  69. .stab 0 : { *(.stab) }
  70. .stabstr 0 : { *(.stabstr) }
  71. .stab.excl 0 : { *(.stab.excl) }
  72. .stab.exclstr 0 : { *(.stab.exclstr) }
  73. .stab.index 0 : { *(.stab.index) }
  74. .stab.indexstr 0 : { *(.stab.indexstr) }
  75. .comment 0 : { *(.comment) }
  76. /* DWARF debug sections.
  77. Symbols in the DWARF debugging sections are relative to the beginning
  78. of the section so we begin them at 0. */
  79. /* DWARF 1 */
  80. .debug 0 : { *(.debug) }
  81. .line 0 : { *(.line) }
  82. /* GNU DWARF 1 extensions */
  83. .debug_srcinfo 0 : { *(.debug_srcinfo) }
  84. .debug_sfnames 0 : { *(.debug_sfnames) }
  85. /* DWARF 1.1 and DWARF 2 */
  86. .debug_aranges 0 : { *(.debug_aranges) }
  87. .debug_pubnames 0 : { *(.debug_pubnames) }
  88. /* DWARF 2 */
  89. .debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) }
  90. .debug_abbrev 0 : { *(.debug_abbrev) }
  91. .debug_line 0 : { *(.debug_line) }
  92. .debug_frame 0 : { *(.debug_frame) }
  93. .debug_str 0 : { *(.debug_str) }
  94. .debug_loc 0 : { *(.debug_loc) }
  95. .debug_macinfo 0 : { *(.debug_macinfo) }
  96. /* SGI/MIPS DWARF 2 extensions */
  97. .debug_weaknames 0 : { *(.debug_weaknames) }
  98. .debug_funcnames 0 : { *(.debug_funcnames) }
  99. .debug_typenames 0 : { *(.debug_typenames) }
  100. .debug_varnames 0 : { *(.debug_varnames) }
  101. }