lpc11c24.ld 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  1. /*
  2. * Pavel Kirienko, 2014 <pavel.kirienko@gmail.com>
  3. * Linker script for LPC11C24
  4. */
  5. MEMORY
  6. {
  7. FLASH (rx) : ORIGIN = 0x00000000, LENGTH = 32K
  8. /* Notice RAM offset - this is needed for on-chip CCAN */
  9. RAM (rwx) : ORIGIN = 0x100000C0, LENGTH = 0x1F40
  10. }
  11. ENTRY(Reset_Handler)
  12. SECTIONS
  13. {
  14. . = 0;
  15. _text = .;
  16. startup :
  17. {
  18. KEEP(*(vectors))
  19. } > FLASH
  20. constructors : ALIGN(4) SUBALIGN(4)
  21. {
  22. PROVIDE(__init_array_start = .);
  23. KEEP(*(SORT(.init_array.*)))
  24. KEEP(*(.init_array))
  25. PROVIDE(__init_array_end = .);
  26. } > FLASH
  27. /* NO DESTRUCTORS */
  28. .text :
  29. {
  30. *(.text.startup.*)
  31. *(.text)
  32. *(.text.*)
  33. *(.rodata)
  34. *(.rodata.*)
  35. *(.glue_7t)
  36. *(.glue_7)
  37. *(.gcc*)
  38. } > FLASH
  39. .ARM.extab :
  40. {
  41. *(.ARM.extab* .gnu.linkonce.armextab.*)
  42. } > FLASH
  43. .ARM.exidx : {
  44. PROVIDE(__exidx_start = .);
  45. *(.ARM.exidx* .gnu.linkonce.armexidx.*)
  46. PROVIDE(__exidx_end = .);
  47. } > FLASH
  48. .eh_frame_hdr :
  49. {
  50. *(.eh_frame_hdr)
  51. } > FLASH
  52. .eh_frame : ONLY_IF_RO
  53. {
  54. *(.eh_frame)
  55. } > FLASH
  56. .textalign : ONLY_IF_RO
  57. {
  58. . = ALIGN(8);
  59. } > FLASH
  60. . = ALIGN(4);
  61. _etext = .;
  62. _textdata = _etext;
  63. .data :
  64. {
  65. . = ALIGN(4);
  66. PROVIDE(_data = .);
  67. *(.data)
  68. . = ALIGN(4);
  69. *(.data.*)
  70. . = ALIGN(4);
  71. *(.ramtext)
  72. . = ALIGN(4);
  73. PROVIDE(_edata = .);
  74. } > RAM AT > FLASH
  75. .bss :
  76. {
  77. . = ALIGN(4);
  78. PROVIDE(_bss = .);
  79. *(.bss)
  80. . = ALIGN(4);
  81. *(.bss.*)
  82. . = ALIGN(4);
  83. *(COMMON)
  84. . = ALIGN(4);
  85. PROVIDE(_ebss = .);
  86. } > RAM
  87. PROVIDE(__stack_end = ORIGIN(RAM) + LENGTH(RAM));
  88. }