ea3152.ld 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  1. /****************************************************************************
  2. * configs/ea3152/scripts/ea3152.ld
  3. *
  4. * Copyright (C) 2011-2012, 2017 Gregory Nutt. All rights reserved.
  5. * Author: Gregory Nutt <gnutt@nuttx.org>
  6. *
  7. * Redistribution and use in source and binary forms, with or without
  8. * modification, are permitted provided that the following conditions
  9. * are met:
  10. *
  11. * 1. Redistributions of source code must retain the above copyright
  12. * notice, this list of conditions and the following disclaimer.
  13. * 2. Redistributions in binary form must reproduce the above copyright
  14. * notice, this list of conditions and the following disclaimer in
  15. * the documentation and/or other materials provided with the
  16. * distribution.
  17. * 3. Neither the name NuttX nor the names of its contributors may be
  18. * used to endorse or promote products derived from this software
  19. * without specific prior written permission.
  20. *
  21. * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
  22. * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
  23. * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
  24. * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
  25. * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
  26. * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
  27. * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
  28. * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
  29. * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  30. * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
  31. * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  32. * POSSIBILITY OF SUCH DAMAGE.
  33. *
  34. ****************************************************************************/
  35. /* The LPC3152 has 192Kb of ISRAM beginning at virtual address 0x1102:8000.
  36. * LPC31xx boot ROM expects the boot image be compiled with entry point at
  37. * 0x1102:9000. A 128b header will appear at this address (applied by
  38. * lpc313xImgCreator) and the executable code must begin at 0x1102:9080.
  39. */
  40. MEMORY
  41. {
  42. isram (rwx) : ORIGIN = 0x11029080, LENGTH = 192K - 4224
  43. }
  44. OUTPUT_ARCH(arm)
  45. ENTRY(_stext)
  46. SECTIONS
  47. {
  48. .text : {
  49. _stext = ABSOLUTE(.);
  50. *(.vectors)
  51. *(.text .text.*)
  52. *(.fixup)
  53. *(.gnu.warning)
  54. *(.rodata .rodata.*)
  55. *(.gnu.linkonce.t.*)
  56. *(.glue_7)
  57. *(.glue_7t)
  58. *(.got)
  59. *(.gcc_except_table)
  60. *(.gnu.linkonce.r.*)
  61. _etext = ABSOLUTE(.);
  62. } > isram
  63. .init_section : {
  64. _sinit = ABSOLUTE(.);
  65. *(.init_array .init_array.*)
  66. _einit = ABSOLUTE(.);
  67. } > isram
  68. .ARM.extab : {
  69. *(.ARM.extab*)
  70. } > isram
  71. __exidx_start = ABSOLUTE(.);
  72. .ARM.exidx : {
  73. *(.ARM.exidx*)
  74. } > isram
  75. __exidx_end = ABSOLUTE(.);
  76. _eronly = ABSOLUTE(.);
  77. .data : {
  78. _sdata = ABSOLUTE(.);
  79. *(.data .data.*)
  80. *(.gnu.linkonce.d.*)
  81. CONSTRUCTORS
  82. _edata = ABSOLUTE(.);
  83. } > isram
  84. .bss : {
  85. _sbss = ABSOLUTE(.);
  86. *(.bss .bss.*)
  87. *(.gnu.linkonce.b.*)
  88. *(COMMON)
  89. _ebss = ABSOLUTE(.);
  90. } > isram
  91. /* Stabs debugging sections. */
  92. .stab 0 : { *(.stab) }
  93. .stabstr 0 : { *(.stabstr) }
  94. .stab.excl 0 : { *(.stab.excl) }
  95. .stab.exclstr 0 : { *(.stab.exclstr) }
  96. .stab.index 0 : { *(.stab.index) }
  97. .stab.indexstr 0 : { *(.stab.indexstr) }
  98. .comment 0 : { *(.comment) }
  99. .debug_abbrev 0 : { *(.debug_abbrev) }
  100. .debug_info 0 : { *(.debug_info) }
  101. .debug_line 0 : { *(.debug_line) }
  102. .debug_pubnames 0 : { *(.debug_pubnames) }
  103. .debug_aranges 0 : { *(.debug_aranges) }
  104. }