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