OSDN Git Service

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