rtthread-lpc43xx_spifi.ld 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133
  1. /*
  2. * linker script for LPC43xx SPIFI (4Mb NorFlash, 32kB SRAM ) with GNU ld
  3. * yiyue.fang 2012-04-14
  4. */
  5. /* Program Entry, set to mark it as "used" and avoid gc */
  6. MEMORY
  7. {
  8. CODE (rx) : ORIGIN = 0x14000000, LENGTH = 0x00400000
  9. DATA (rw) : ORIGIN = 0x10000000, LENGTH = 0x00008000
  10. }
  11. ENTRY(Reset_Handler)
  12. _system_stack_size = 0x200;
  13. SECTIONS
  14. {
  15. .text :
  16. {
  17. . = ALIGN(4);
  18. KEEP(*(.interrupt_vector)) /* Startup code */
  19. . = ALIGN(4);
  20. *(.text) /* remaining code */
  21. *(.text.*) /* remaining code */
  22. *(.rodata) /* read-only data (constants) */
  23. *(.rodata*)
  24. *(.glue_7)
  25. *(.glue_7t)
  26. *(.gnu.linkonce.t*)
  27. /* section information for finsh shell */
  28. . = ALIGN(4);
  29. __fsymtab_start = .;
  30. KEEP(*(FSymTab))
  31. __fsymtab_end = .;
  32. . = ALIGN(4);
  33. __vsymtab_start = .;
  34. KEEP(*(VSymTab))
  35. __vsymtab_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. .stack :
  63. {
  64. . = . + _system_stack_size;
  65. . = ALIGN(4);
  66. _estack = .;
  67. } >DATA
  68. __bss_start = .;
  69. .bss :
  70. {
  71. . = ALIGN(4);
  72. /* This is used by the startup in order to initialize the .bss secion */
  73. _sbss = .;
  74. *(.bss)
  75. *(.bss.*)
  76. *(COMMON)
  77. . = ALIGN(4);
  78. /* This is used by the startup in order to initialize the .bss secion */
  79. _ebss = . ;
  80. *(.bss.init)
  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. }