1: /*
2: *----------------------------------------------------------------------
3: * T2EX Software Package
4: *
5: * Copyright 2012 by Ken Sakamura.
6: * This software is distributed under the latest version of T-License 2.x.
7: *----------------------------------------------------------------------
8: *
9: * Released by T-Engine Forum(http://www.t-engine.org/) at 2012/12/12.
10: * Modified by T-Engine Forum at 2013/03/04.
11: * Modified by TRON Forum(http://www.tron.org/) at 2015/06/04.
12: *
13: *----------------------------------------------------------------------
14: */
15: /*
16: * This software package is available for use, modification,
17: * and redistribution in accordance with the terms of the attached
18: * T-License 2.x.
19: * If you want to redistribute the source code, you need to attach
20: * the T-License 2.x document.
21: * There's no obligation to publish the content, and no obligation
22: * to disclose it to the TRON Forum if you have modified the
23: * software package.
24: * You can also distribute the modified source code. In this case,
25: * please register the modification to T-Kernel traceability service.
26: * People can know the history of modifications by the service,
27: * and can be sure that the version you have inherited some
28: * modification of a particular version or not.
29: *
30: * http://trace.tron.org/tk/?lang=en
31: * http://trace.tron.org/tk/?lang=ja
32: *
33: * As per the provisions of the T-License 2.x, TRON Forum ensures that
34: * the portion of the software that is copyrighted by Ken Sakamura or
35: * the TRON Forum does not infringe the copyrights of a third party.
36: * However, it does not make any warranty other than this.
37: * DISCLAIMER: TRON Forum and Ken Sakamura shall not be held
38: * responsible for any consequences or damages caused directly or
39: * indirectly by the use of this software package.
40: *
41: * The source codes in bsd_source.tar.gz in this software package are
42: * derived from NetBSD or OpenBSD and not covered under T-License 2.x.
43: * They need to be changed or redistributed according to the
44: * representation of each source header.
45: */
46:
47: /*
48: * kernel_t2ex-ram.lnk (sysmain, EM1-D512)
49: * linker script (RAM, with T2EX memory protection)
50: */
51:
52: OUTPUT_FORMAT("elf32-larm-tkernel", "elf32-barm-tkernel", "elf32-larm-tkernel")
53: OUTPUT_ARCH(arm)
54: ENTRY(_start)
55:
56: SECTIONS
57: {
58: .text 0x30006000 : {
59: /* System Level (Executable) */
60: PROVIDE (__stext = .);
61: PROVIDE (_stext = .);
62: PROVIDE (stext = .);
63: KEEP (*(.init))
64: *(EXCLUDE_FILE (*.uo) .text)
65: *(EXCLUDE_FILE (*.uo) .text.*)
66: *(EXCLUDE_FILE (*.uo) .stub)
67: *(.text)
68: *(.text.*)
69: *(.stub)
70: *(.glue_7t)
71: *(.glue_7)
72: KEEP (*(.fini))
73: PROVIDE (__etext = .);
74: PROVIDE (_etext = .);
75: PROVIDE (etext = .);
76: . = ALIGN(4);
77: /* System Level (Read-Only Data) */
78: PROVIDE (__srodata = .);
79: PROVIDE (_srodata = .);
80: PROVIDE (srodata = .);
81: *(EXCLUDE_FILE (*.uo) .rodata)
82: *(EXCLUDE_FILE (*.uo) .rodata.*)
83: *(EXCLUDE_FILE (*.uo) .rodata1)
84: PROVIDE (__erodata = .);
85: PROVIDE (_erodata = .);
86: PROVIDE (erodata = .);
87: . = ALIGN(4);
88: /* User Level (Executable) */
89: PROVIDE (__stext_usr = .);
90: PROVIDE (_stext_usr = .);
91: PROVIDE (stext_usr = .);
92: *.uo(.text)
93: *.uo(.text.*)
94: *.uo(.stub)
95: PROVIDE (__etext_usr = .);
96: PROVIDE (_etext_usr = .);
97: PROVIDE (etext_usr = .);
98: . = ALIGN(4);
99: /* User Level (Read-Only Data) */
100: PROVIDE (__srodata_usr = .);
101: PROVIDE (_srodata_usr = .);
102: PROVIDE (srodata_usr = .);
103: *.uo(.rodata)
104: *.uo(.rodata.*)
105: *.uo(.rodata1)
106: PROVIDE (__erodata_usr = .);
107: PROVIDE (_erodata_usr = .);
108: PROVIDE (erodata_usr = .);
109: . = ALIGN(0x1000);
110: } /*:text*/ =0
111: __data_org = . ;
112: .data ALIGN(0x10) : {
113: __data_start = . ;
114: *(EXCLUDE_FILE (*.uo) .data)
115: *(EXCLUDE_FILE (*.uo) .data.*)
116: SORT(CONSTRUCTORS)
117: *(EXCLUDE_FILE (*.uo) .data1)
118: KEEP (*(EXCLUDE_FILE (*.uo) .eh_frame))
119: *(EXCLUDE_FILE (*.uo) .gcc_except_table)
120: KEEP (*crtbegin.o(.ctors))
121: KEEP (*(EXCLUDE_FILE (*crtend.o ) .ctors))
122: KEEP (*(SORT(.ctors.*)))
123: KEEP (*(.ctors))
124: KEEP (*crtbegin.o(.dtors))
125: KEEP (*(EXCLUDE_FILE (*crtend.o ) .dtors))
126: KEEP (*(SORT(.dtors.*)))
127: KEEP (*(.dtors))
128: *(.got.plt)
129: *(.got)
130: *(EXCLUDE_FILE (*.uo) .sdata)
131: *(EXCLUDE_FILE (*.uo) .sdata.*)
132: _edata = .;
133: PROVIDE (edata = .);
134: } /*:data*/
135: .bss : {
136: __bss_start = .;
137: PROVIDE (__sbss_start = .);
138: PROVIDE (___sbss_start = .);
139: *(EXCLUDE_FILE (*.uo) .sbss)
140: *(EXCLUDE_FILE (*.uo) .sbss.*)
141: *(EXCLUDE_FILE (*.uo) .scommon)
142: PROVIDE (__sbss_end = .);
143: PROVIDE (___sbss_end = .);
144: *(EXCLUDE_FILE (*.uo) .bss)
145: *(EXCLUDE_FILE (*.uo) .bss.*)
146: *(EXCLUDE_FILE (*.uo) COMMON)
147: . = ALIGN(4);
148: _end = .;
149: PROVIDE (end = .);
150: . = ALIGN(0x1000);
151: } /*:bss*/
152: __data_usr_org = . ;
153: .data_usr ALIGN(0x10) : {
154: __data_usr_start = . ;
155: *.uo(.data)
156: *.uo(.data.*)
157: *.uo(.data1)
158: KEEP (*.uo(.eh_frame))
159: *.uo(.gcc_except_table)
160: *.uo(.sdata)
161: *.uo(.sdata.*)
162: . = ALIGN(4);
163: _edata_usr = .;
164: PROVIDE (edata_usr = .);
165: } /*:data_usr*/
166: .bss_usr : {
167: __bss_usr_start = .;
168: PROVIDE (__sbss_usr_start = .);
169: PROVIDE (___sbss_usr_start = .);
170: *.uo(.sbss)
171: *.uo(.sbss.*)
172: *.uo(.scommon)
173: PROVIDE (__sbss_usr_end = .);
174: PROVIDE (___sbss_usr_end = .);
175: *.uo(.bss)
176: *.uo(.bss.*)
177: *.uo(COMMON)
178: . = ALIGN(4);
179: _end_usr = .;
180: PROVIDE (end_usr = .);
181: } /*:bss_usr*/
182: }