OSDN Git Service

7835687f111162d898045d74f4b02434ae482dcc
[uclinux-h8/elf2flt.git] / elf2flt.ld
1
2 ENTRY (_start)
3
4 MEMORY {
5         flatmem : ORIGIN = 0x0, LENGTH = 0x100000
6         junk    : ORIGIN = 0x0, LENGTH = 0x100000
7 }
8
9 SECTIONS {
10         .text 0 : {
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                 *(.init)
22                 *(.fini)
23
24                 /* This is special code area at the end of the normal
25                    text section.  It contains a small lookup table at
26                    the start followed by the code pointed to by entries
27                    in the lookup table.  */
28                 . = ALIGN (4) ;
29                 PROVIDE(__ctbp = .);
30                 *(.call_table_data)
31                 *(.call_table_text)
32
33                 . = ALIGN(0x10) ;
34                 _etext = . ;
35         } > flatmem
36         .data : {
37                 . = ALIGN(0x4) ;
38                 _sdata = . ;
39                 __data_start = . ;
40                 data_start = . ;
41                 *(.got.plt)
42                 *(.got)
43                 LONG(-1)
44                 *(.rodata)
45                 *(.rodata1)
46                 *(.rodata.*)
47                 *(.gnu.linkonce.r*)
48                 *(.data)
49                 *(.data1)
50                 *(.data.*)
51                 *(.gnu.linkonce.d*)
52                 *(.data1)
53                 *(.eh_frame)
54                 *(.gcc_except_table)
55                 *(.sdata) 
56                 *(.sdata.*)
57                 *(.gnu.linkonce.s.*)
58                 *(__libc_atexit)
59                 *(__libc_subinit)
60                 *(__libc_subfreeres)
61                 *(.note.ABI-tag)
62                 . = ALIGN(4) ;
63                 *(.ctors.*)
64                 *(.ctors)
65                 LONG(0)
66                 *(.dtors.*)
67                 *(.dtors)
68                 LONG(0)
69                 . = ALIGN(0x10) ;
70                 _edata = . ;
71         } > flatmem
72         .bss : {
73                 . = ALIGN(0x4) ;
74                 _sbss = ALIGN(0x4) ;
75                 __bss_start = . ;
76                 *(.dynsbss)
77                 *(.sbss)
78                 *(.sbss.*)
79                 *(.scommon)
80                 *(.dynbss)
81                 *(.bss)
82                 *(.bss.*)
83                 *(COMMON)
84                 . = ALIGN(0x4) ;
85                 _ebss = . ;
86                 _end = . ;
87                 end = . ;
88         } > flatmem
89
90         .junk : {
91                 *(.rel*)
92                 *(.rela*)
93         } > junk
94 }