Revision dc28c732 ppc64.ld
b/ppc64.ld | ||
---|---|---|
1 | 1 |
/* Script for -z combreloc: combine and sort reloc sections */ |
2 | 2 |
OUTPUT_FORMAT("elf64-powerpc", "elf64-powerpc", |
3 |
"elf64-powerpc")
|
|
3 |
"elf64-powerpc")
|
|
4 | 4 |
OUTPUT_ARCH(powerpc:common64) |
5 | 5 |
ENTRY(_start) |
6 |
SEARCH_DIR("/usr/powerpc64-unknown-linux-gnu/lib64"); |
|
7 |
EARCH_DIR("/usr/lib/binutils/powerpc64-unknown-linux-gnu/2.16.164"); |
|
8 |
EARCH_DIR("/usr/local/lib64"); SEARCH_DIR("/lib64"); SEARCH_DIR("/usr/lib64"); |
|
9 |
EARCH_DIR("/usr/powerpc64-unknown-linux-gnu/lib"); |
|
10 |
EARCH_DIR("/usr/lib/binutils/powerpc64-unknown-linux-gnu/2.16.1"); |
|
11 |
EARCH_DIR("/usr/local/lib"); SEARCH_DIR("/lib"); SEARCH_DIR("/usr/lib"); |
|
12 |
/* Do we need any of these for elf? |
|
13 |
__DYNAMIC = 0; */ |
|
6 |
SEARCH_DIR("/usr/powerpc64-unknown-linux-gnu/lib64"); |
|
7 |
SEARCH_DIR("/usr/lib/binutils/powerpc64-unknown-linux-gnu/2.16.164"); |
|
8 |
SEARCH_DIR("/usr/local/lib64"); SEARCH_DIR("/lib64"); SEARCH_DIR("/usr/lib64"); |
|
9 |
SEARCH_DIR("/usr/powerpc64-unknown-linux-gnu/lib"); |
|
10 |
SEARCH_DIR("/usr/lib/binutils/powerpc64-unknown-linux-gnu/2.16.1"); |
|
11 |
SEARCH_DIR("/usr/local/lib"); SEARCH_DIR("/lib"); SEARCH_DIR("/usr/lib"); /* Do we |
|
12 |
need any of these for elf? + __DYNAMIC = 0; */ |
|
14 | 13 |
SECTIONS |
15 | 14 |
{ |
16 | 15 |
/* Read-only sections, merged into text segment: */ |
... | ... | |
63 | 62 |
} |
64 | 63 |
.rel.plt : { *(.rel.plt) } |
65 | 64 |
.rela.plt : { *(.rela.plt) } |
66 |
.rela.tocbss : { *(.rela.tocbss) }
|
|
65 |
.rela.tocbss : { *(.rela.tocbss) }
|
|
67 | 66 |
.init : |
68 | 67 |
{ |
69 | 68 |
KEEP (*(.init)) |
... | ... | |
89 | 88 |
.sbss2 : { *(.sbss2 .sbss2.* .gnu.linkonce.sb2.*) } |
90 | 89 |
.eh_frame_hdr : { *(.eh_frame_hdr) } |
91 | 90 |
.eh_frame : ONLY_IF_RO { KEEP (*(.eh_frame)) } |
92 |
.gcc_except_table : ONLY_IF_RO { KEEP (*(.gcc_except_table)) |
|
93 |
(.gcc_except_table.*) } |
|
94 |
/* Adjust the address for the data segment. We want to adjust up to |
|
95 |
the same address within the page on the next page up. */ |
|
96 |
. = ALIGN (0x10000) - ((0x10000 - .) & (0x10000 - 1)); . = |
|
97 |
ATA_SEGMENT_ALIGN (0x10000, 0x1000); |
|
98 |
/* Exception handling */ |
|
91 |
.gcc_except_table : ONLY_IF_RO { KEEP (*(.gcc_except_table)) |
|
92 |
*(.gcc_except_table.*) } /* Adjust the address for the data segment. We want to |
|
93 |
adjust up to + the same address within the page on the next page up. */ |
|
94 |
. = ALIGN (0x10000) - ((0x10000 - .) & (0x10000 - 1)); . = DATA_SEGMENT_ALIGN |
|
95 |
(0x10000, 0x1000); /* Exception handling */ |
|
99 | 96 |
.eh_frame : ONLY_IF_RW { KEEP (*(.eh_frame)) } |
100 |
.gcc_except_table : ONLY_IF_RW { KEEP (*(.gcc_except_table)) |
|
101 |
(.gcc_except_table.*) } |
|
102 |
/* Thread Local Storage sections */ |
|
103 |
.tdata : { *(.tdata .tdata.* .gnu.linkonce.td.*) } |
|
104 |
.tbss : { *(.tbss .tbss.* .gnu.linkonce.tb.*) *(.tcommon) } |
|
97 |
.gcc_except_table : ONLY_IF_RW { KEEP (*(.gcc_except_table)) |
|
98 |
*(.gcc_except_table.*) } /* Thread Local Storage sections */ |
|
99 |
.tdata : { *(.tdata .tdata.* .gnu.linkonce.td.*) } |
|
100 |
.tbss : { *(.tbss .tbss.* .gnu.linkonce.tb.*) *(.tcommon) } |
|
105 | 101 |
/* Ensure the __preinit_array_start label is properly aligned. We |
106 | 102 |
could instead move the label definition inside the section, but |
107 | 103 |
the linker would then create the section even if it turns out to |
... | ... | |
154 | 150 |
SORT(CONSTRUCTORS) |
155 | 151 |
} |
156 | 152 |
.data1 : { *(.data1) } |
157 |
.toc1 ALIGN(8) : { *(.toc1) }
|
|
158 |
.opd ALIGN(8) : { KEEP (*(.opd)) }
|
|
159 |
.got ALIGN(8) : { *(.got .toc) }
|
|
153 |
.toc1 ALIGN(8) : { *(.toc1) }
|
|
154 |
.opd ALIGN(8) : { KEEP (*(.opd)) }
|
|
155 |
.got ALIGN(8) : { *(.got .toc) }
|
|
160 | 156 |
/* We want the small data sections together, so single-instruction offsets |
161 | 157 |
can access them all, and initialized data all before uninitialized, so |
162 | 158 |
we can shorten the on-disk segment size. */ |
... | ... | |
167 | 163 |
_edata = .; |
168 | 164 |
PROVIDE (edata = .); |
169 | 165 |
__bss_start = .; |
170 |
.tocbss ALIGN(8) : { *(.tocbss)}
|
|
166 |
.tocbss ALIGN(8) : { *(.tocbss)}
|
|
171 | 167 |
.sbss : |
172 | 168 |
{ |
173 | 169 |
PROVIDE (__sbss_start = .); |
Also available in: Unified diff