lm3s_rom.ld 3.6 KB

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