• Home
  • History
  • Annotate
  • Line#
  • Navigate
  • Raw
  • Download
  • only in /asuswrt-rt-n18u-9.0.0.4.380.2695/release/src-rt-6.x.4708/toolchains/hndtools-armeabi-2011.09/arm-none-eabi/lib/thumb2/
1/* Linker script for ARM Simulator (VFP)
2 *
3 * Version: Sourcery CodeBench Lite 2011.09-69
4 * Support: https://support.codesourcery.com/GNUToolchain/
5 *
6 * Copyright (c) 2007, 2008, 2009, 2010 CodeSourcery, Inc.
7 *
8 * The authors hereby grant permission to use, copy, modify, distribute,
9 * and license this software and its documentation for any purpose, provided
10 * that existing copyright notices are retained in all copies and that this
11 * notice is included verbatim in any distributions.  No written agreement,
12 * license, or royalty fee is required for any of the authorized uses.
13 * Modifications to this software may be copyrighted by their authors
14 * and need not follow the licensing terms described here, provided that
15 * the new terms are clearly indicated on the first page of each file where
16 * they apply.
17 */
18OUTPUT_FORMAT ("elf32-littlearm", "elf32-bigarm", "elf32-littlearm")
19ENTRY(__cs3_reset)
20SEARCH_DIR(.)
21GROUP(-lgcc -lc -lcs3 -lcs3hosted -lcs3arm)
22
23MEMORY
24{
25  ram (rwx) : ORIGIN = 0x0, LENGTH = 128M
26}
27
28/* These force the linker to search for particular symbols from
29 * the start of the link process and thus ensure the user's
30 * overrides are picked up
31 */
32EXTERN(__cs3_reset __cs3_reset_generic_vfp)
33EXTERN(__cs3_start_asm __cs3_start_asm_sim)
34/* Bring in the interrupt routines & vector */
35INCLUDE arm-names.inc
36EXTERN(__cs3_interrupt_vector_arm)
37EXTERN(__cs3_start_c main __cs3_stack __cs3_heap_end)
38/* force exit to be picked up in a hosted or os environment */
39EXTERN(exit atexit)
40
41/* Provide fall-back values */
42PROVIDE(__cs3_heap_start = _end);
43PROVIDE(__cs3_heap_end = __cs3_region_start_ram + __cs3_region_size_ram);
44PROVIDE(__cs3_region_num = (__cs3_regions_end - __cs3_regions) / 20);
45/* Ensure that newlib runs the finalizers */
46__libc_fini = _fini;
47PROVIDE(__cs3_stack = __cs3_region_start_ram + __cs3_region_size_ram);
48
49SECTIONS
50{
51  .text :
52  {
53    CREATE_OBJECT_SYMBOLS
54    __cs3_region_start_ram = .;
55    _ftext = .;
56    *(.cs3.region-head.ram)
57    ASSERT (. == __cs3_region_start_ram, ".cs3.region-head.ram not permitted");
58    __cs3_interrupt_vector = __cs3_interrupt_vector_arm;
59    *(.cs3.interrupt_vector)
60    /* Make sure we pulled in an interrupt vector.  */
61    ASSERT (. != __cs3_interrupt_vector_arm, "No interrupt vector");
62
63    PROVIDE(__cs3_reset = __cs3_reset_generic_vfp);
64    *(.cs3.reset)
65    __cs3_start_asm_sim = DEFINED(__cs3_start_asm) ? __cs3_start_asm : __cs3_start_asm_sim;
66
67    *(.text.cs3.init)
68    *(.text .text.* .gnu.linkonce.t.*)
69    *(.plt)
70    *(.gnu.warning)
71    *(.glue_7t) *(.glue_7) *(.vfp11_veneer)
72
73    *(.ARM.extab* .gnu.linkonce.armextab.*)
74    *(.gcc_except_table)
75  } >ram
76  .eh_frame_hdr : ALIGN (4)
77  {
78    KEEP (*(.eh_frame_hdr))
79  } >ram
80  .eh_frame : ALIGN (4)
81  {
82    KEEP (*(.eh_frame))
83  } >ram
84  /* .ARM.exidx is sorted, so has to go in its own output section.  */
85  PROVIDE_HIDDEN (__exidx_start = .);
86  .ARM.exidx :
87  {
88    *(.ARM.exidx* .gnu.linkonce.armexidx.*)
89  } >ram
90  PROVIDE_HIDDEN (__exidx_end = .);
91  .rodata : ALIGN (4)
92  {
93    *(.rodata .rodata.* .gnu.linkonce.r.*)
94
95    . = ALIGN(4);
96    KEEP(*(.init))
97
98    . = ALIGN(4);
99    __preinit_array_start = .;
100    KEEP (*(.preinit_array))
101    __preinit_array_end = .;
102
103    . = ALIGN(4);
104    __init_array_start = .;
105    KEEP (*(SORT(.init_array.*)))
106    KEEP (*(.init_array))
107    __init_array_end = .;
108
109    . = ALIGN(4);
110    KEEP(*(.fini))
111
112    . = ALIGN(4);
113    __fini_array_start = .;
114    KEEP (*(.fini_array))
115    KEEP (*(SORT(.fini_array.*)))
116    __fini_array_end = .;
117
118    . = ALIGN(0x4);
119    KEEP (*crtbegin.o(.ctors))
120    KEEP (*(EXCLUDE_FILE (*crtend.o) .ctors))
121    KEEP (*(SORT(.ctors.*)))
122    KEEP (*crtend.o(.ctors))
123
124    . = ALIGN(0x4);
125    KEEP (*crtbegin.o(.dtors))
126    KEEP (*(EXCLUDE_FILE (*crtend.o) .dtors))
127    KEEP (*(SORT(.dtors.*)))
128    KEEP (*crtend.o(.dtors))
129
130    . = ALIGN(4);
131    __cs3_regions = .;
132    LONG (0)
133    LONG (__cs3_region_init_ram)
134    LONG (__cs3_region_start_ram)
135    LONG (__cs3_region_init_size_ram)
136    LONG (__cs3_region_zero_size_ram)
137    __cs3_regions_end = .;
138    . = ALIGN (8);
139    _etext = .;
140  } >ram
141
142  ASSERT (!(__cs3_region_init_ram & 7), "__cs3_region_init_ram not aligned")
143  ASSERT (!(__cs3_region_start_ram & 7), "__cs3_region_start_ram not aligned")
144  ASSERT (!(__cs3_region_init_size_ram & 7), "__cs3_region_init_size_ram not aligned")
145  ASSERT (!(__cs3_region_zero_size_ram & 7), "__cs3_region_zero_size_ram not aligned")
146  .data : ALIGN (8)
147  {
148    KEEP(*(.jcr))
149    *(.got.plt) *(.got)
150    *(.shdata)
151    *(.data .data.* .gnu.linkonce.d.*)
152    . = ALIGN (8);
153    *(.ram)
154    . = ALIGN (8);
155    _edata = .;
156  } >ram
157  .bss : ALIGN (8)
158  {
159    *(.shbss)
160    *(.bss .bss.* .gnu.linkonce.b.*)
161    *(COMMON)
162    . = ALIGN (8);
163    *(.ram.b .bss.ram)
164    . = ALIGN (8);
165    _end = .;
166    __end = .;
167  } >ram
168  __cs3_region_init_ram = __cs3_region_start_ram;
169  __cs3_region_init_size_ram = _edata - __cs3_region_start_ram;
170  __cs3_region_zero_size_ram = _end - _edata;
171  /* Default to 1M of heap */
172  __cs3_region_size_ram = ALIGN (1024) - __cs3_region_start_ram + 1M;
173
174  .stab 0 (NOLOAD) : { *(.stab) }
175  .stabstr 0 (NOLOAD) : { *(.stabstr) }
176  /* DWARF debug sections.
177   * Symbols in the DWARF debugging sections are relative to
178   * the beginning of the section so we begin them at 0.
179   */
180  /* DWARF 1 */
181  .debug          0 : { *(.debug) }
182  .line           0 : { *(.line) }
183  /* GNU DWARF 1 extensions */
184  .debug_srcinfo  0 : { *(.debug_srcinfo) }
185  .debug_sfnames  0 : { *(.debug_sfnames) }
186  /* DWARF 1.1 and DWARF 2 */
187  .debug_aranges  0 : { *(.debug_aranges) }
188  .debug_pubnames 0 : { *(.debug_pubnames) }
189  /* DWARF 2 */
190  .debug_info     0 : { *(.debug_info .gnu.linkonce.wi.*) }
191  .debug_abbrev   0 : { *(.debug_abbrev) }
192  .debug_line     0 : { *(.debug_line) }
193  .debug_frame    0 : { *(.debug_frame) }
194  .debug_str      0 : { *(.debug_str) }
195  .debug_loc      0 : { *(.debug_loc) }
196  .debug_macinfo  0 : { *(.debug_macinfo) }
197  /* DWARF 2.1 */
198  .debug_ranges   0 : { *(.debug_ranges) }
199  /* SGI/MIPS DWARF 2 extensions */
200  .debug_weaknames 0 : { *(.debug_weaknames) }
201  .debug_funcnames 0 : { *(.debug_funcnames) }
202  .debug_typenames 0 : { *(.debug_typenames) }
203  .debug_varnames  0 : { *(.debug_varnames) }
204
205  .note.gnu.arm.ident 0 : { KEEP (*(.note.gnu.arm.ident)) }
206  .ARM.attributes 0 : { KEEP (*(.ARM.attributes)) }
207  /DISCARD/ : { *(.note.GNU-stack) }
208}
209/* checksum: 32ab378a5948fc730c7676 */
210