OSDN Git Service

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