1 | SECTIONS
|
2 | {
|
3 | /* Read-only sections, merged into text segment: */
|
4 | PROVIDE (__executable_start = 0x10000); . = 0x10000 + SIZEOF_HEADERS;
|
5 | .interp : { *(.interp) }
|
6 | .hash : { *(.hash) }
|
7 | .dynsym : { *(.dynsym) }
|
8 | .dynstr : { *(.dynstr) }
|
9 | .gnu.version : { *(.gnu.version) }
|
10 | .gnu.version_d : { *(.gnu.version_d) }
|
11 | .gnu.version_r : { *(.gnu.version_r) }
|
12 | .rel.dyn :
|
13 | {
|
14 | *(.rel.init)
|
15 | *(.rel.text .rel.text.* .rel.gnu.linkonce.t.*)
|
16 | *(.rel.fini)
|
17 | *(.rel.rodata .rel.rodata.* .rel.gnu.linkonce.r.*)
|
18 | *(.rel.data .rel.data.* .rel.gnu.linkonce.d.*)
|
19 | *(.rel.tdata .rel.tdata.* .rel.gnu.linkonce.td.*)
|
20 | *(.rel.tbss .rel.tbss.* .rel.gnu.linkonce.tb.*)
|
21 | *(.rel.ctors)
|
22 | *(.rel.dtors)
|
23 | *(.rel.got)
|
24 | *(.rel.bss .rel.bss.* .rel.gnu.linkonce.b.*)
|
25 | }
|
26 | .rela.dyn :
|
27 | {
|
28 | *(.rela.init)
|
29 | *(.rela.text .rela.text.* .rela.gnu.linkonce.t.*)
|
30 | *(.rela.fini)
|
31 | *(.rela.rodata .rela.rodata.* .rela.gnu.linkonce.r.*)
|
32 | *(.rela.data .rela.data.* .rela.gnu.linkonce.d.*)
|
33 | *(.rela.tdata .rela.tdata.* .rela.gnu.linkonce.td.*)
|
34 | *(.rela.tbss .rela.tbss.* .rela.gnu.linkonce.tb.*)
|
35 | *(.rela.ctors)
|
36 | *(.rela.dtors)
|
37 | *(.rela.got)
|
38 | *(.rela.bss .rela.bss.* .rela.gnu.linkonce.b.*)
|
39 | }
|
40 | .rel.plt : { *(.rel.plt) }
|
41 | .rela.plt : { *(.rela.plt) }
|
42 | .init :
|
43 | {
|
44 | _init = .;
|
45 | KEEP (*(.init$00));
|
46 | KEEP (*(.init$0[1-9]));
|
47 | KEEP (*(.init$[1-8][0-9]));
|
48 | KEEP (*(.init$9[0-8]));
|
49 | KEEP (*(.init))
|
50 | KEEP (*(.init$99));
|
51 | } =0
|
52 | .plt : { *(.plt) }
|
53 | .text :
|
54 | {
|
55 | *(.text .stub .text.* .gnu.linkonce.t.*)
|
56 | /* .gnu.warning sections are handled specially by elf32.em. */
|
57 | *(.gnu.warning)
|
58 | } =0
|
59 | .fini :
|
60 | {
|
61 | _fini = .;
|
62 | KEEP (*(.fini$00));
|
63 | KEEP (*(.fini$0[1-9]));
|
64 | KEEP (*(.fini$[1-8][0-9]));
|
65 | KEEP (*(.fini$9[0-8]));
|
66 | KEEP (*(.fini))
|
67 | KEEP (*(.fini$99));
|
68 | PROVIDE (__etext = .);
|
69 | PROVIDE (_etext = .);
|
70 | } =0
|
71 | PROVIDE (__etext_unrelocated = .);
|
72 | PROVIDE (_etext_unrelocated = .);
|
73 | PROVIDE (etext_unrelocated = .);
|
74 | .rodata : { *(.rodata .rodata.* .gnu.linkonce.r.*) }
|
75 | .rodata1 : { *(.rodata1) }
|
76 | .eh_frame_hdr : { *(.eh_frame_hdr) }
|
77 | /* Adjust the address for the data segment. We want to adjust up to
|
78 | the same address within the page on the next page up. */
|
79 | . = ALIGN (0x10000) - ((0x10000 - .) & (0x10000 - 1)); . = DATA_SEGMENT_ALIGN (0x10000, 0x2000);
|
80 | /* Ensure the __preinit_array_start label is properly aligned. We
|
81 | could instead move the label definition inside the section, but
|
82 | the linker would then create the section even if it turns out to
|
83 | be empty, which isn't pretty. */
|
84 | . = ALIGN(8);
|
85 | PROVIDE (__preinit_array_start = .);
|
86 | .preinit_array : { *(.preinit_array) }
|
87 | PROVIDE (__preinit_array_end = .);
|
88 | PROVIDE (__init_array_start = .);
|
89 | .init_array : { *(.init_array) }
|
90 | PROVIDE (__init_array_end = .);
|
91 | PROVIDE (__fini_array_start = .);
|
92 | .fini_array : { *(.fini_array) }
|
93 | PROVIDE (__fini_array_end = .);
|
94 | .data :
|
95 | {
|
96 | *(.data .data.* .gnu.linkonce.d.*)
|
97 | SORT(CONSTRUCTORS)
|
98 | }
|
99 | .data1 : { *(.data1) }
|
100 | .tdata : { *(.tdata .tdata.* .gnu.linkonce.td.*) }
|
101 | .tbss : { *(.tbss .tbss.* .gnu.linkonce.tb.*) *(.tcommon) }
|
102 | .eh_frame : { KEEP (*(.eh_frame)) }
|
103 | .gcc_except_table : { *(.gcc_except_table) }
|
104 | .dynamic : { *(.dynamic) }
|
105 | .ctors :
|
106 | {
|
107 | /* gcc uses crtbegin.o to find the start of
|
108 | the constructors, so we make sure it is
|
109 | first. Because this is a wildcard, it
|
110 | doesn't matter if the user does not
|
111 | actually link against crtbegin.o; the
|
112 | linker won't look for a file to match a
|
113 | wildcard. The wildcard also means that it
|
114 | doesn't matter which directory crtbegin.o
|
115 | is in. */
|
116 | KEEP (*crtbegin*.o(.ctors))
|
117 | /* We don't want to include the .ctor section from
|
118 | from the crtend.o file until after the sorted ctors.
|
119 | The .ctor section from the crtend file contains the
|
120 | end of ctors marker and it must be last */
|
121 | KEEP (*(EXCLUDE_FILE (*crtend*.o ) .ctors))
|
122 | KEEP (*(SORT(.ctors.*)))
|
123 | KEEP (*(.ctors))
|
124 | }
|
125 | .dtors :
|
126 | {
|
127 | KEEP (*crtbegin*.o(.dtors))
|
128 | KEEP (*(EXCLUDE_FILE (*crtend*.o ) .dtors))
|
129 | KEEP (*(SORT(.dtors.*)))
|
130 | KEEP (*(.dtors))
|
131 | }
|
132 | .jcr : { KEEP (*(.jcr)) }
|
133 | .got : { *(.got.plt) *(.got) }
|
134 | .edata : { PROVIDE (_edata = .); }
|
135 | __bss_start = .;
|
136 | .bss :
|
137 | {
|
138 | *(.dynbss)
|
139 | *(.bss .bss.* .gnu.linkonce.b.*)
|
140 | *(COMMON)
|
141 | /* Align here to ensure that the .bss section occupies space up to
|
142 | _end. Align after .bss to ensure correct alignment even if the
|
143 | .bss section disappears because there are no input sections. */
|
144 | . = ALIGN(8);
|
145 | }
|
146 | . = ALIGN(8);
|
147 | _end = .;
|
148 | PROVIDE (end = .);
|
149 | . = DATA_SEGMENT_END (.);
|
150 | /* Stabs debugging sections. */
|
151 | .stab 0 : { *(.stab) }
|
152 | .stabstr 0 : { *(.stabstr) }
|
153 | .stab.excl 0 : { *(.stab.excl) }
|
154 | .stab.exclstr 0 : { *(.stab.exclstr) }
|
155 | .stab.index 0 : { *(.stab.index) }
|
156 | .stab.indexstr 0 : { *(.stab.indexstr) }
|
157 | .comment 0 : { *(.comment) }
|
158 | /* DWARF debug sections.
|
159 | Symbols in the DWARF debugging sections are relative to the beginning
|
160 | of the section so we begin them at 0. */
|
161 | /* DWARF 1 */
|
162 | .debug 0 : { *(.debug) }
|
163 | .line 0 : { *(.line) }
|
164 | /* GNU DWARF 1 extensions */
|
165 | .debug_srcinfo 0 : { *(.debug_srcinfo) }
|
166 | .debug_sfnames 0 : { *(.debug_sfnames) }
|
167 | /* DWARF 1.1 and DWARF 2 */
|
168 | .debug_aranges 0 : { *(.debug_aranges) }
|
169 | .debug_pubnames 0 : { *(.debug_pubnames) }
|
170 | /* DWARF 2 */
|
171 | .debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) }
|
172 | .debug_abbrev 0 : { *(.debug_abbrev) }
|
173 | .debug_line 0 : { *(.debug_line) }
|
174 | .debug_frame 0 : { *(.debug_frame) }
|
175 | .debug_str 0 : { *(.debug_str) }
|
176 | .debug_loc 0 : { *(.debug_loc) }
|
177 | .debug_macinfo 0 : { *(.debug_macinfo) }
|
178 | /* SGI/MIPS DWARF 2 extensions */
|
179 | .debug_weaknames 0 : { *(.debug_weaknames) }
|
180 | .debug_funcnames 0 : { *(.debug_funcnames) }
|
181 | .debug_typenames 0 : { *(.debug_typenames) }
|
182 | .debug_varnames 0 : { *(.debug_varnames) }
|
183 | PROVIDE (__ehdr = 0x10000);
|
184 | PROVIDE (_ehdr = 0x10000);
|
185 | /DISCARD/ : { *(.note.GNU-stack) }
|
186 | }
|