• 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)
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_rom = .;
57    _ftext = .;
58    *(.cs3.region-head.rom)
59    ASSERT (. == __cs3_region_start_rom, ".cs3.region-head.rom 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);
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  } >rom
78  .eh_frame_hdr : ALIGN (4)
79  {
80    KEEP (*(.eh_frame_hdr))
81    *(.eh_frame_entry .eh_frame_entry.*)
82  } >rom
83  .eh_frame : ALIGN (4)
84  {
85    KEEP (*(.eh_frame)) *(.eh_frame.*)
86  } >rom
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  } >rom
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    *(.rom)
143    *(.rom.b .bss.rom)
144    _etext = .;
145  } >rom
146  /* __cs3_region_end_rom is deprecated */
147  __cs3_region_end_rom = __cs3_region_start_rom + LENGTH(rom);
148  __cs3_region_size_rom = LENGTH(rom);
149
150  ASSERT (!(__cs3_region_init_ram & 7), "__cs3_region_init_ram not aligned")
151  ASSERT (!(__cs3_region_start_ram & 7), "__cs3_region_start_ram not aligned")
152  ASSERT (!(__cs3_region_init_size_ram & 7), "__cs3_region_init_size_ram not aligned")
153  ASSERT (!(__cs3_region_zero_size_ram & 7), "__cs3_region_zero_size_ram not aligned")
154  .data : ALIGN (8)
155  {
156    __cs3_region_start_ram = .;
157    *(.cs3.region-head.ram)
158    KEEP(*(.jcr))
159    *(.got.plt) *(.got)
160    *(.shdata)
161    *(.data .data.* .gnu.linkonce.d.*)
162    . = ALIGN (8);
163    *(.ram)
164    . = ALIGN (8);
165    _edata = .;
166  } >ram AT>rom
167  .bss : ALIGN (8)
168  {
169    *(.shbss)
170    *(.bss .bss.* .gnu.linkonce.b.*)
171    *(COMMON)
172    . = ALIGN (8);
173    *(.ram.b .bss.ram)
174    . = ALIGN (8);
175    _end = .;
176    __end = .;
177  } >ram AT>rom
178  /* __cs3_region_end_ram is deprecated */
179  __cs3_region_end_ram = __cs3_region_start_ram + LENGTH(ram);
180  __cs3_region_size_ram = LENGTH(ram);
181  __cs3_region_init_ram = LOADADDR (.data);
182  __cs3_region_init_size_ram = _edata - ADDR (.data);
183  __cs3_region_zero_size_ram = _end - _edata;
184
185  .stab 0 (NOLOAD) : { *(.stab) }
186  .stabstr 0 (NOLOAD) : { *(.stabstr) }
187  /* DWARF debug sections.
188   * Symbols in the DWARF debugging sections are relative to
189   * the beginning of the section so we begin them at 0.
190   */
191  /* DWARF 1 */
192  .debug          0 : { *(.debug) }
193  .line           0 : { *(.line) }
194  /* GNU DWARF 1 extensions */
195  .debug_srcinfo  0 : { *(.debug_srcinfo) }
196  .debug_sfnames  0 : { *(.debug_sfnames) }
197  /* DWARF 1.1 and DWARF 2 */
198  .debug_aranges  0 : { *(.debug_aranges) }
199  .debug_pubnames 0 : { *(.debug_pubnames) }
200  /* DWARF 2 */
201  .debug_info     0 : { *(.debug_info .gnu.linkonce.wi.*) }
202  .debug_abbrev   0 : { *(.debug_abbrev) }
203  .debug_line     0 : { *(.debug_line) }
204  .debug_frame    0 : { *(.debug_frame) }
205  .debug_str      0 : { *(.debug_str) }
206  .debug_loc      0 : { *(.debug_loc) }
207  .debug_macinfo  0 : { *(.debug_macinfo) }
208  /* DWARF 2.1 */
209  .debug_ranges   0 : { *(.debug_ranges) }
210  /* SGI/MIPS DWARF 2 extensions */
211  .debug_weaknames 0 : { *(.debug_weaknames) }
212  .debug_funcnames 0 : { *(.debug_funcnames) }
213  .debug_typenames 0 : { *(.debug_typenames) }
214  .debug_varnames  0 : { *(.debug_varnames) }
215
216  .note.gnu.arm.ident 0 : { KEEP (*(.note.gnu.arm.ident)) }
217  .ARM.attributes 0 : { KEEP (*(.ARM.attributes)) }
218  /DISCARD/ : { *(.note.GNU-stack) }
219}
220/* checksum: 1a3d5a361156e704954176371e64 */
221