• 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 Xilinx Zynq-7000
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 -lcs3hosted -lcs3arm)
23
24MEMORY
25{
26  ram (rwx) : ORIGIN = 0x0, LENGTH = 1024M
27  rom (rx) : ORIGIN = 0xe4000000, LENGTH = 64M
28}
29
30/* These force the linker to search for particular symbols from
31 * the start of the link process and thus ensure the user's
32 * overrides are picked up
33 */
34EXTERN(__cs3_reset __cs3_reset_zynq7000_ram)
35EXTERN(__cs3_start_asm _start)
36/* Bring in the interrupt routines & vector */
37INCLUDE arm-names.inc
38EXTERN(__cs3_interrupt_vector_arm)
39EXTERN(__cs3_start_c main __cs3_stack __cs3_heap_end)
40/* force exit to be picked up in a hosted or os environment */
41EXTERN(exit atexit)
42
43/* Provide fall-back values */
44PROVIDE(__cs3_heap_start = _end);
45PROVIDE(__cs3_heap_end = __cs3_region_start_ram + __cs3_region_size_ram);
46PROVIDE(__cs3_region_num = (__cs3_regions_end - __cs3_regions) / 20);
47/* Ensure that newlib runs the finalizers */
48__libc_fini = _fini;
49PROVIDE(__cs3_stack = __cs3_region_start_ram + __cs3_region_size_ram);
50
51SECTIONS
52{
53  .text :
54  {
55    CREATE_OBJECT_SYMBOLS
56    __cs3_region_start_ram = .;
57    _ftext = .;
58    *(.cs3.region-head.ram)
59    ASSERT (. == __cs3_region_start_ram, ".cs3.region-head.ram not permitted");
60    __cs3_interrupt_vector = __cs3_interrupt_vector_arm;
61    *(.cs3.interrupt_vector)
62    /* Make sure we pulled in an interrupt vector.  */
63    ASSERT (. != __cs3_interrupt_vector_arm, "No interrupt vector");
64
65    PROVIDE(__cs3_reset = __cs3_reset_zynq7000_ram);
66    *(.cs3.reset)
67    _start = DEFINED(__cs3_start_asm) ? __cs3_start_asm : _start;
68
69    *(.text.cs3.init)
70    *(.text .text.* .gnu.linkonce.t.*)
71    *(.plt)
72    *(.gnu.warning)
73    *(.glue_7t) *(.glue_7) *(.vfp11_veneer)
74
75    *(.ARM.extab* .gnu.linkonce.armextab.*)
76    *(.gcc_except_table)
77  } >ram
78  .eh_frame_hdr : ALIGN (4)
79  {
80    KEEP (*(.eh_frame_hdr))
81    *(.eh_frame_entry .eh_frame_entry.*)
82  } >ram
83  .eh_frame : ALIGN (4)
84  {
85    KEEP (*(.eh_frame)) *(.eh_frame.*)
86  } >ram
87  /* .ARM.exidx is sorted, so has to go in its own output section.  */
88  PROVIDE_HIDDEN (__exidx_start = .);
89  .ARM.exidx :
90  {
91    *(.ARM.exidx* .gnu.linkonce.armexidx.*)
92  } >ram
93  PROVIDE_HIDDEN (__exidx_end = .);
94  .rodata : ALIGN (4)
95  {
96    *(.rodata .rodata.* .gnu.linkonce.r.*)
97
98    . = ALIGN(4);
99    KEEP(*(.init))
100
101    . = ALIGN(4);
102    __preinit_array_start = .;
103    KEEP (*(.preinit_array))
104    __preinit_array_end = .;
105
106    . = ALIGN(4);
107    __init_array_start = .;
108    KEEP (*(SORT(.init_array.*)))
109    KEEP (*(.init_array))
110    __init_array_end = .;
111
112    . = ALIGN(4);
113    KEEP(*(.fini))
114
115    . = ALIGN(4);
116    __fini_array_start = .;
117    KEEP (*(.fini_array))
118    KEEP (*(SORT(.fini_array.*)))
119    __fini_array_end = .;
120
121    . = ALIGN(0x4);
122    KEEP (*crtbegin.o(.ctors))
123    KEEP (*(EXCLUDE_FILE (*crtend.o) .ctors))
124    KEEP (*(SORT(.ctors.*)))
125    KEEP (*crtend.o(.ctors))
126
127    . = ALIGN(0x4);
128    KEEP (*crtbegin.o(.dtors))
129    KEEP (*(EXCLUDE_FILE (*crtend.o) .dtors))
130    KEEP (*(SORT(.dtors.*)))
131    KEEP (*crtend.o(.dtors))
132
133    . = ALIGN(4);
134    __cs3_regions = .;
135    LONG (0)
136    LONG (__cs3_region_init_ram)
137    LONG (__cs3_region_start_ram)
138    LONG (__cs3_region_init_size_ram)
139    LONG (__cs3_region_zero_size_ram)
140    __cs3_regions_end = .;
141    . = ALIGN (8);
142    _etext = .;
143  } >ram
144
145  ASSERT (!(__cs3_region_init_ram & 7), "__cs3_region_init_ram not aligned")
146  ASSERT (!(__cs3_region_start_ram & 7), "__cs3_region_start_ram not aligned")
147  ASSERT (!(__cs3_region_init_size_ram & 7), "__cs3_region_init_size_ram not aligned")
148  ASSERT (!(__cs3_region_zero_size_ram & 7), "__cs3_region_zero_size_ram not aligned")
149  .cs3.rom : ALIGN (8)
150  {
151    __cs3_region_start_rom = .;
152    *(.cs3.region-head.rom)
153    *(.rom)
154    . = ALIGN (8);
155  } >rom
156  .cs3.rom.bss :
157  {
158    *(.rom.b .bss.rom)
159    . = ALIGN (8);
160  } >rom
161  /* __cs3_region_end_rom is deprecated */
162  __cs3_region_end_rom = __cs3_region_start_rom + LENGTH(rom);
163  __cs3_region_size_rom = LENGTH(rom);
164  __cs3_region_init_rom = LOADADDR (.cs3.rom);
165  __cs3_region_init_size_rom = LOADADDR (.cs3.rom.bss) - LOADADDR (.cs3.rom);
166  __cs3_region_zero_size_rom = SIZEOF(.cs3.rom.bss);
167
168  .data : ALIGN (8)
169  {
170    KEEP(*(.jcr))
171    *(.got.plt) *(.got)
172    *(.shdata)
173    *(.data .data.* .gnu.linkonce.d.*)
174    . = ALIGN (8);
175    *(.ram)
176    . = ALIGN (8);
177    _edata = .;
178  } >ram
179  .bss : ALIGN (8)
180  {
181    *(.shbss)
182    *(.bss .bss.* .gnu.linkonce.b.*)
183    *(COMMON)
184    . = ALIGN (8);
185    *(.ram.b .bss.ram)
186    . = ALIGN (8);
187    _end = .;
188    __end = .;
189  } >ram
190  /* __cs3_region_end_ram is deprecated */
191  __cs3_region_end_ram = __cs3_region_start_ram + LENGTH(ram);
192  __cs3_region_size_ram = LENGTH(ram);
193  __cs3_region_init_ram = LOADADDR (.text);
194  __cs3_region_init_size_ram = _edata - ADDR (.text);
195  __cs3_region_zero_size_ram = _end - _edata;
196
197  .stab 0 (NOLOAD) : { *(.stab) }
198  .stabstr 0 (NOLOAD) : { *(.stabstr) }
199  /* DWARF debug sections.
200   * Symbols in the DWARF debugging sections are relative to
201   * the beginning of the section so we begin them at 0.
202   */
203  /* DWARF 1 */
204  .debug          0 : { *(.debug) }
205  .line           0 : { *(.line) }
206  /* GNU DWARF 1 extensions */
207  .debug_srcinfo  0 : { *(.debug_srcinfo) }
208  .debug_sfnames  0 : { *(.debug_sfnames) }
209  /* DWARF 1.1 and DWARF 2 */
210  .debug_aranges  0 : { *(.debug_aranges) }
211  .debug_pubnames 0 : { *(.debug_pubnames) }
212  /* DWARF 2 */
213  .debug_info     0 : { *(.debug_info .gnu.linkonce.wi.*) }
214  .debug_abbrev   0 : { *(.debug_abbrev) }
215  .debug_line     0 : { *(.debug_line) }
216  .debug_frame    0 : { *(.debug_frame) }
217  .debug_str      0 : { *(.debug_str) }
218  .debug_loc      0 : { *(.debug_loc) }
219  .debug_macinfo  0 : { *(.debug_macinfo) }
220  /* DWARF 2.1 */
221  .debug_ranges   0 : { *(.debug_ranges) }
222  /* SGI/MIPS DWARF 2 extensions */
223  .debug_weaknames 0 : { *(.debug_weaknames) }
224  .debug_funcnames 0 : { *(.debug_funcnames) }
225  .debug_typenames 0 : { *(.debug_typenames) }
226  .debug_varnames  0 : { *(.debug_varnames) }
227
228  .note.gnu.arm.ident 0 : { KEEP (*(.note.gnu.arm.ident)) }
229  .ARM.attributes 0 : { KEEP (*(.ARM.attributes)) }
230  /DISCARD/ : { *(.note.GNU-stack) }
231}
232/* checksum: 42f10c69a04dad841d441 */
233