1 /*
2 * Copyright (C) 2013 Texas Instruments Incorporated - http://www.ti.com/
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions
6 * are met:
7 *
8 * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer.
10 *
11 * Redistributions in binary form must reproduce the above copyright
12 * notice, this list of conditions and the following disclaimer in the
13 * documentation and/or other materials provided with the
14 * distribution.
15 *
16 * Neither the name of Texas Instruments Incorporated nor the names of
17 * its contributors may be used to endorse or promote products derived
18 * from this software without specific prior written permission.
19 *
20 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
21 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
22 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
23 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
24 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
25 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
26 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
27 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
28 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
29 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
30 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31 *
32 */
33 OUTPUT_FORMAT("elf32-littlearm", "elf32-bigarm", "elf32-littlearm")
34 OUTPUT_ARCH(arm)
35 ENTRY(_start)
37 SECTIONS
38 {
39 . = 0x0c5f0000;
40 __start__ = . ;
41 .text :
42 {
43 init.o (.text)
44 *(.text .stub .text.* .gnu.linkonce.t.*)
45 } =0
46 PROVIDE (__etext = .);
47 PROVIDE (_etext = .);
48 PROVIDE (etext = .);
49 .rodata :
50 {
51 *(.rodata .rodata.* .gnu.linkonce.r.*)
52 *(.rodata1)
53 }
54 /*. = ALIGN(CONSTANT (MAXPAGESIZE)) + (. & (CONSTANT (MAXPAGESIZE) - 1)); */
55 .data :
56 {
57 __data_start = . ;
58 *(.data .data.* .gnu.linkonce.d.*)
59 SORT(CONSTRUCTORS)
60 }
61 _edata = .; PROVIDE (edata = .);
63 __bss_start = .;
64 __bss_start__ = .;
65 .bss :
66 {
67 *(.bss .bss.* .gnu.linkonce.b.*)
68 *(COMMON)
69 . = ALIGN(. != 0 ? 6 : 1);
70 }
71 _bss_end__ = . ; __bss_end__ = . ;
72 . = ALIGN(32 / 8);
73 . = . + 4096;
74 __stack = .;
75 __end__ = . ;
76 _end = .; PROVIDE (end = .);
77 /* Stabs debugging sections. */
78 .stab 0 : { *(.stab) }
79 .stabstr 0 : { *(.stabstr) }
80 .stab.excl 0 : { *(.stab.excl) }
81 .stab.exclstr 0 : { *(.stab.exclstr) }
82 .stab.index 0 : { *(.stab.index) }
83 .stab.indexstr 0 : { *(.stab.indexstr) }
84 .comment 0 : { *(.comment) }
85 /* DWARF debug sections.
86 Symbols in the DWARF debugging sections are relative to the beginning
87 of the section so we begin them at 0. */
88 /* DWARF 1 */
89 .debug 0 : { *(.debug) }
90 .line 0 : { *(.line) }
91 /* GNU DWARF 1 extensions */
92 .debug_srcinfo 0 : { *(.debug_srcinfo) }
93 .debug_sfnames 0 : { *(.debug_sfnames) }
94 /* DWARF 1.1 and DWARF 2 */
95 .debug_aranges 0 : { *(.debug_aranges) }
96 .debug_pubnames 0 : { *(.debug_pubnames) }
97 /* DWARF 2 */
98 .debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) }
99 .debug_abbrev 0 : { *(.debug_abbrev) }
100 .debug_line 0 : { *(.debug_line) }
101 .debug_frame 0 : { *(.debug_frame) }
102 .debug_str 0 : { *(.debug_str) }
103 .debug_loc 0 : { *(.debug_loc) }
104 .debug_macinfo 0 : { *(.debug_macinfo) }
105 /* SGI/MIPS DWARF 2 extensions */
106 .debug_weaknames 0 : { *(.debug_weaknames) }
107 .debug_funcnames 0 : { *(.debug_funcnames) }
108 .debug_typenames 0 : { *(.debug_typenames) }
109 .debug_varnames 0 : { *(.debug_varnames) }
110 /* DWARF 3 */
111 .debug_pubtypes 0 : { *(.debug_pubtypes) }
112 .debug_ranges 0 : { *(.debug_ranges) }
113 .ARM.attributes 0 : { KEEP (*(.ARM.attributes)) KEEP (*(.gnu.attributes)) }
114 /DISCARD/ : { *(.note.GNU-stack) *(.gnu_debuglink) *(.note.gnu.build-id) }
115 }