Advertisement
Guest User

Untitled

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