Guest User

Untitled

a guest
Oct 4th, 2016
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.12 KB | None | 0 0
  1. /*******************************************************************************
  2. * (c) Copyright 2008 Actel Corporation. All rights reserved.
  3. *
  4. * Cortex-M1 example linker script: Boot from Intel 28F640 (2x16) Flash memory
  5. *
  6. * SVN $Revision: 7510 $
  7. * SVN $Date: 2015-07-01 09:41:12 +0100 (Wed, 01 Jul 2015) $
  8. */
  9. OUTPUT_FORMAT("elf32-littlearm", "elf32-bigarm",
  10. "elf32-littlearm")
  11. GROUP(-lc -lgcc -lm)
  12. OUTPUT_ARCH(arm)
  13. ENTRY(_start)
  14. SEARCH_DIR(.)
  15. __DYNAMIC = 0;
  16.  
  17. /*******************************************************************************
  18. * Start of board customization.
  19. *******************************************************************************/
  20. MEMORY
  21. {
  22. /*
  23. * WARNING: The words "SOFTCONSOLE", "FLASH", and "USE", the colon ":", and
  24. * the name of the type of flash memory are all in a specific order.
  25. * Please do not modify that comment line, in order to ensure
  26. * debugging of your application will use the flash memory correctly.
  27. */
  28.  
  29. /* SOFTCONSOLE FLASH USE: intel-28f640-2x16 */
  30. rom (rx) : ORIGIN = 0x00000000, LENGTH = 1M
  31.  
  32. /* Normal SRAM */
  33. ram (rwx) : ORIGIN = 0x08000000, LENGTH = 1M
  34. }
  35.  
  36. RAM_START_ADDRESS = 0x08000000; /* Must be the same value MEMORY region ram ORIGIN above. */
  37. RAM_SIZE = 1M; /* Must be the same value MEMORY region ram LENGTH above. */
  38. MAIN_STACK_SIZE = 256k; /* Cortex main stack size. */
  39. PROCESS_STACK_SIZE = 16k; /* Cortex process stack size (only available with OS extensions).*/
  40.  
  41. /*******************************************************************************
  42. * End of board customization.
  43. *******************************************************************************/
  44.  
  45. PROVIDE (__main_stack_start = RAM_START_ADDRESS + RAM_SIZE);
  46. PROVIDE (__process_stack_start = __main_stack_start - MAIN_STACK_SIZE);
  47.  
  48. SECTIONS
  49. {
  50. .reset :
  51. {
  52. KEEP (*(.isr_vector))
  53. KEEP (*sys_boot.o(.text))
  54. . = ALIGN(0x4);
  55. } >rom
  56.  
  57. .text :
  58. {
  59. CREATE_OBJECT_SYMBOLS
  60. __text_load = LOADADDR(.text);
  61. __text_start = .;
  62.  
  63. *(.text .text.* .gnu.linkonce.t.*)
  64. *(.plt)
  65. *(.gnu.warning)
  66. *(.glue_7t) *(.glue_7) *(.vfp11_veneer)
  67.  
  68. . = ALIGN(0x4);
  69. /* These are for running static constructors and destructors under ELF. */
  70. KEEP (*crtbegin.o(.ctors))
  71. KEEP (*(EXCLUDE_FILE (*crtend.o) .ctors))
  72. KEEP (*(SORT(.ctors.*)))
  73. KEEP (*crtend.o(.ctors))
  74. KEEP (*crtbegin.o(.dtors))
  75. KEEP (*(EXCLUDE_FILE (*crtend.o) .dtors))
  76. KEEP (*(SORT(.dtors.*)))
  77. KEEP (*crtend.o(.dtors))
  78.  
  79. *(.rodata .rodata.* .gnu.linkonce.r.*)
  80.  
  81. *(.ARM.extab* .gnu.linkonce.armextab.*)
  82. *(.gcc_except_table)
  83. *(.eh_frame_hdr)
  84. *(.eh_frame)
  85.  
  86. KEEP (*(.init))
  87. KEEP (*(.fini))
  88.  
  89. PROVIDE_HIDDEN (__preinit_array_start = .);
  90. KEEP (*(.preinit_array))
  91. PROVIDE_HIDDEN (__preinit_array_end = .);
  92. PROVIDE_HIDDEN (__init_array_start = .);
  93. KEEP (*(SORT(.init_array.*)))
  94. KEEP (*(.init_array))
  95. PROVIDE_HIDDEN (__init_array_end = .);
  96. PROVIDE_HIDDEN (__fini_array_start = .);
  97. KEEP (*(.fini_array))
  98. KEEP (*(SORT(.fini_array.*)))
  99. PROVIDE_HIDDEN (__fini_array_end = .);
  100. } >ram AT>rom
  101. /* .ARM.exidx is sorted, so has to go in its own output section. */
  102. __exidx_start = .;
  103. .ARM.exidx :
  104. {
  105. *(.ARM.exidx* .gnu.linkonce.armexidx.*)
  106. } >ram AT>rom
  107. __exidx_end = .;
  108. _etext = .;
  109.  
  110. .data :
  111. {
  112. __data_load = LOADADDR(.data);
  113. __data_start = .;
  114. KEEP(*(.jcr))
  115. *(.got.plt) *(.got)
  116. *(.shdata)
  117. *(.data .data.* .gnu.linkonce.d.*)
  118. . = ALIGN (4);
  119. _edata = .;
  120. } >ram AT>rom
  121.  
  122. .bss :
  123. {
  124. __bss_start__ = . ;
  125. *(.shbss)
  126. *(.bss .bss.* .gnu.linkonce.b.*)
  127. *(COMMON)
  128. . = ALIGN (8);
  129. __bss_end__ = .;
  130. _end = .;
  131. __end = _end;
  132. PROVIDE(end = .);
  133. } >ram AT>rom
  134.  
  135. .stab 0 (NOLOAD) :
  136. {
  137. *(.stab)
  138. }
  139.  
  140. .stabstr 0 (NOLOAD) :
  141. {
  142. *(.stabstr)
  143. }
  144. /* DWARF debug sections.
  145. Symbols in the DWARF debugging sections are relative to the beginning
  146. of the section so we begin them at 0. */
  147. /* DWARF 1 */
  148. .debug 0 : { *(.debug) }
  149. .line 0 : { *(.line) }
  150. /* GNU DWARF 1 extensions */
  151. .debug_srcinfo 0 : { *(.debug_srcinfo) }
  152. .debug_sfnames 0 : { *(.debug_sfnames) }
  153. /* DWARF 1.1 and DWARF 2 */
  154. .debug_aranges 0 : { *(.debug_aranges) }
  155. .debug_pubnames 0 : { *(.debug_pubnames) }
  156. /* DWARF 2 */
  157. .debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) }
  158. .debug_abbrev 0 : { *(.debug_abbrev) }
  159. .debug_line 0 : { *(.debug_line) }
  160. .debug_frame 0 : { *(.debug_frame) }
  161. .debug_str 0 : { *(.debug_str) }
  162. .debug_loc 0 : { *(.debug_loc) }
  163. .debug_macinfo 0 : { *(.debug_macinfo) }
  164. /* SGI/MIPS DWARF 2 extensions */
  165. .debug_weaknames 0 : { *(.debug_weaknames) }
  166. .debug_funcnames 0 : { *(.debug_funcnames) }
  167. .debug_typenames 0 : { *(.debug_typenames) }
  168. .debug_varnames 0 : { *(.debug_varnames) }
  169. .note.gnu.arm.ident 0 : { KEEP (*(.note.gnu.arm.ident)) }
  170. .ARM.attributes 0 : { KEEP (*(.ARM.attributes)) }
  171. /DISCARD/ : { *(.note.GNU-stack) }
  172. }
Add Comment
Please, Sign In to add comment