OSDN Git Service

acb893c116dcdbfb83e1a9e502348ab84c29ceb7
[uclinux-h8/elf2flt.git] / elf2flt.ld
1
2 ENTRY (_start)
3
4 MEMORY {
5         flatmem : ORIGIN = 0x0, LENGTH = 0xffffff
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                 *(.sdata) 
63                 *(.sdata.*)
64                 *(.gnu.linkonce.s.*)
65                 *(__libc_atexit)
66                 *(__libc_subinit)
67                 *(__libc_subfreeres)
68                 *(.note.ABI-tag)
69
70                 . = ALIGN(4) ;
71                 __CTOR_LIST__ = .;
72                 LONG((__CTOR_END__ - __CTOR_LIST__) / 4 - 2)
73                 *(.ctors)
74                 LONG(0)
75                 __CTOR_END__ = .;
76                 __DTOR_LIST__ = .;
77                 LONG((__DTOR_END__ - __DTOR_LIST__) / 4 - 2)
78                 *(.dtors)
79                 LONG(0)
80                 __DTOR_END__ = .;
81
82                 . = ALIGN(0x10) ; 
83                 _edata = . ;
84         } > flatmem
85         .bss : {
86                 . = ALIGN(0x4) ;
87                 _sbss = ALIGN(0x4) ;
88                 __bss_start = . ;
89                 *(.dynsbss)
90                 *(.sbss)
91                 *(.sbss.*)
92                 *(.scommon)
93                 *(.dynbss)
94                 *(.bss)
95                 *(.bss.*)
96                 *(.bss*)
97                 *(COMMON)
98                 . = ALIGN(0x10) ;
99                 _ebss = . ;
100                 _end = . ;
101                 end = . ;
102         } > flatmem
103
104         .junk 0 : { *(.rel*) *(.rela*) }
105         /* Stabs debugging sections.    */
106         .stab 0 : { *(.stab) }
107         .stabstr 0 : { *(.stabstr) }
108         .stab.excl 0 : { *(.stab.excl) }
109         .stab.exclstr 0 : { *(.stab.exclstr) }
110         .stab.index 0 : { *(.stab.index) }
111         .stab.indexstr 0 : { *(.stab.indexstr) }
112         .comment 0 : { *(.comment) }
113         .debug_abbrev 0 : { *(.debug_abbrev) }
114         .debug_info 0 : { *(.debug_info) }
115         .debug_line 0 : { *(.debug_line) }
116         .debug_pubnames 0 : { *(.debug_pubnames) }
117         .debug_aranges 0 : { *(.debug_aranges) }
118 }