OSDN Git Service

Some arches (like the Blackfin architecture) have an ABI where all symbols
[uclinux-h8/elf2flt.git] / e1-elf2flt.ld
1
2 ENTRY (__start)
3
4 MEMORY {
5         flatmem : ORIGIN = 0x0, LENGTH = 0xfffffff
6 }
7
8 SECTIONS {
9         .G6 (DEFINED(G6Base) ? G6Base : 0x0) : {
10           *(.G6)
11         }
12         .G7 (DEFINED(G7Base) ? G7Base : 0x0) : {
13           *(.G7)
14         }
15         .G8 (DEFINED(G8Base) ? G8Base : 0x0) : {
16           *(.G8)
17         }
18         .G9 (DEFINED(G9Base) ? G9Base : 0) : {
19           *(.G9)
20         }
21         .G10 (DEFINED(G10Base) ? G10Base : 0) : {
22           *(.G10)
23         }
24         .G11 (DEFINED(G11Base) ? G11Base : 0) : {
25           *(.G11)
26         }
27         .G12 (DEFINED(G12Base) ? G12Base : 0) : {
28           *(.G12)
29         }
30         .G13 (DEFINED(G13Base) ? G13Base : 0) : {
31           *(.G13)
32         } 
33         .text 0x0 : {
34                 . = . + 4;
35                 . = ALIGN(0x4) ;
36                 _stext = . ;
37                 *(.text)
38                 *(.text.*)
39                 *(.gnu.warning)
40                 *(.stub)
41                 *(.gnu.linkonce.t*)
42                 *(.glue_7t)
43                 *(.glue_7)
44                 *(.jcr)
45                 *(.init)
46                 *(.fini)
47
48 W_RODAT         *(.rodata)
49 W_RODAT         *(.rodata1)
50 W_RODAT         *(.rodata.*)
51
52                 /* This is special code area at the end of the normal
53                    text section.  It contains a small lookup table at
54                    the start followed by the code pointed to by entries
55                    in the lookup table.  */
56                 . = ALIGN (4) ;
57                 PROVIDE(__ctbp = .);
58                 *(.call_table_data)
59                 *(.call_table_text)
60
61                 . = ALIGN(0x20) ;
62                 _etext = . ;
63         } > flatmem
64         .data : {
65                 . = ALIGN(0x4) ;
66                 _sdata = . ;
67                 __data_start = . ;
68                 data_start = . ;
69                 *(.got.plt)
70                 *(.got)
71                 FILL(0) ;
72                 . = ALIGN(0x20) ; 
73                 LONG(-1)
74                 . = ALIGN(0x20) ; 
75 R_RODAT         *(.rodata)
76 R_RODAT         *(.rodata1)
77 R_RODAT         *(.rodata.*)
78                 *(.gnu.linkonce.r*)
79                 *(.data)
80                 *(.data1)
81                 *(.data.*)
82                 *(.gnu.linkonce.d*)
83                 *(.data1)
84                 *(.eh_frame)
85                 *(.gcc_except_table)
86
87                 /* Microblaze has .sdata and .sbss (small bss).  They must
88                    be contiguous, so please don't move any of this. JW */
89                 _ssrw = . ;                     
90                 *(.sdata) 
91                 *(.sdata.*)
92                 *(.sbss)                        /* Don't move this! */
93                 _essrw = . ;
94
95                 _ssrw_size = _essrw - _ssrw;
96                 PROVIDE(_SDA_BASE_ = _ssrw + (_ssrw_size / 2));
97
98                 *(.gnu.linkonce.s.*)
99                 *(__libc_atexit)
100                 *(__libc_subinit)
101                 *(__libc_subfreeres)
102                 *(.note.ABI-tag)
103
104                 /* microblaze-specific read-only small data area
105                    and associated locating symbols */
106                 _ssro = . ;
107                 *(.sdata2)
108                 _essro = . ;
109                 _ssro_size = _essro - _ssro;
110                 PROVIDE(_SDA2_BASE_ = _ssro + (_ssro_size / 2));
111
112                 . = ALIGN(4) ;
113                 __CTOR_LIST__ = .;
114                 LONG((__CTOR_END__ - __CTOR_LIST__) / 4 - 2)
115                 *(.ctors)
116                 LONG(0)
117                 __CTOR_END__ = .;
118                 __DTOR_LIST__ = .;
119                 LONG((__DTOR_END__ - __DTOR_LIST__) / 4 - 2)
120                 *(.dtors)
121                 LONG(0)
122                 __DTOR_END__ = .;
123
124                 . = ALIGN(0x10) ; 
125                 _edata = . ;
126         } > flatmem
127         .bss : {
128                 . = ALIGN(0x4) ;
129                 _sbss = ALIGN(0x4) ;
130                 __bss_start = . ;
131                 *(.dynsbss)
132                 *(.sbss)
133                 *(.sbss.*)
134                 *(.scommon)
135                 *(.dynbss)
136                 *(.bss)
137                 *(.bss.*)
138                 *(.bss*)
139                 *(.gnu.linkonce.b*)
140                 *(COMMON)
141                 . = ALIGN(0x10) ;
142                 _ebss = . ;
143                 _end = . ;
144                 end = . ;
145         } > flatmem
146
147         .junk 0 : { *(.rel*) *(.rela*) }
148         /* Stabs debugging sections.    */
149         .stab 0 : { *(.stab) }
150         .stabstr 0 : { *(.stabstr) }
151         .stab.excl 0 : { *(.stab.excl) }
152         .stab.exclstr 0 : { *(.stab.exclstr) }
153         .stab.index 0 : { *(.stab.index) }
154         .stab.indexstr 0 : { *(.stab.indexstr) }
155         .comment 0 : { *(.comment) }
156         .debug_abbrev 0 : { *(.debug_abbrev) }
157         .debug_info 0 : { *(.debug_info) }
158         .debug_line 0 : { *(.debug_line) }
159         .debug_pubnames 0 : { *(.debug_pubnames) }
160         .debug_aranges 0 : { *(.debug_aranges) }
161 }