annotate src/ppc.ldscript @ 3736:01830ac74073

[xemacs-hg @ 2006-12-11 12:22:47 by aidan] 2006-12-08 Aidan Kehoe <kehoea@parhasard.net> * specifier.c (charset_matches_specifier_tag_set_p): A charset's entry in Vcharset_tag_lists may be nil, if, when that charset was created, no tags with associated charset predicates existed. Accept this possibility, treat it as the tag not matching that charset.
author aidan
date Mon, 11 Dec 2006 12:22:52 +0000
parents 3ecd8885ac67
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1 OUTPUT_FORMAT("elf32-powerpc", "elf32-powerpc",
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2 "elf32-powerpc")
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
3 OUTPUT_ARCH(powerpc)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
4 ENTRY(_start)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
5 SEARCH_DIR(/lib); SEARCH_DIR(/usr/lib); SEARCH_DIR(/usr/local/lib); SEARCH_DIR(/usr/powerpc-unknown-linux-gnulibc1/lib);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
6 /* Do we need any of these for elf?
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
7 __DYNAMIC = 0; */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
8 PROVIDE (__stack = 0);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
9 SECTIONS
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
10 {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
11 /* Read-only sections, merged into text segment: */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
12 . = 0x01800000 + SIZEOF_HEADERS;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
13 .interp : { *(.interp) }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
14 .hash : { *(.hash) }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
15 .dynsym : { *(.dynsym) }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
16 .dynstr : { *(.dynstr) }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
17 .gnu.version : { *(.gnu.version) }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
18 .gnu.version_d : { *(.gnu.version_d) }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
19 .gnu.version_r : { *(.gnu.version_r) }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
20 .rela.text :
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
21 { *(.rela.text) *(.rela.gnu.linkonce.t*) }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
22 .rela.data :
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
23 { *(.rela.data) *(.rela.gnu.linkonce.d*) }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
24 .rela.rodata :
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
25 { *(.rela.rodata) *(.rela.gnu.linkonce.r*) }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
26 .rela.got : { *(.rela.got) }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
27 .rela.got1 : { *(.rela.got1) }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
28 .rela.got2 : { *(.rela.got2) }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
29 .rela.ctors : { *(.rela.ctors) }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
30 .rela.dtors : { *(.rela.dtors) }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
31 .rela.init : { *(.rela.init) }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
32 .rela.fini : { *(.rela.fini) }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
33 .rela.bss : { *(.rela.bss) }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
34 .rela.plt : { *(.rela.plt) }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
35 .rela.sdata : { *(.rela.sdata) }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
36 .rela.sbss : { *(.rela.sbss) }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
37 .rela.sdata2 : { *(.rela.sdata2) }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
38 .rela.sbss2 : { *(.rela.sbss2) }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
39 .text :
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
40 {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
41 *(.text)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
42 /* .gnu.warning sections are handled specially by elf32.em. */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
43 *(.gnu.warning)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
44 *(.gnu.linkonce.t*)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
45 } =0
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
46 .init : { *(.init) } =0
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
47 .fini : { *(.fini) } =0
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
48 .rodata : { *(.rodata) *(.gnu.linkonce.r*) }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
49 .rodata1 : { *(.rodata1) }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
50 _etext = .;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
51 PROVIDE (etext = .);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
52 .sdata2 : { *(.sdata2) }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
53 .sbss2 : { *(.sbss2) }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
54 /* Adjust the address for the data segment. We want to adjust up to
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
55 the same address within the page on the next page up. It would
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
56 be more correct to do this:
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
57 . = .;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
58 The current expression does not correctly handle the case of a
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
59 text segment ending precisely at the end of a page; it causes the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
60 data segment to skip a page. The above expression does not have
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
61 this problem, but it will currently (2/95) cause BFD to allocate
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
62 a single segment, combining both text and data, for this case.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
63 This will prevent the text segment from being shared among
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
64 multiple executions of the program; I think that is more
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
65 important than losing a page of the virtual address space (note
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
66 that no actual memory is lost; the page which is skipped can not
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
67 be referenced). */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
68 . = .;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
69 .data :
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
70 {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
71 *(.data)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
72 *(.gnu.linkonce.d*)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
73 CONSTRUCTORS
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
74 }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
75 .data1 : { *(.data1) }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
76 .got1 : { *(.got1) }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
77 .dynamic : { *(.dynamic) }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
78 /* Put .ctors and .dtors next to the .got2 section, so that the pointers
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
79 get relocated with -mrelocatable. Also put in the .fixup pointers.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
80 The current compiler no longer needs this, but keep it around for 2.7.2 */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
81 PROVIDE (_GOT2_START_ = .);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
82 .got2 : { *(.got2) }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
83 PROVIDE (__CTOR_LIST__ = .);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
84 .ctors : { *(.ctors) }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
85 PROVIDE (__CTOR_END__ = .);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
86 PROVIDE (__DTOR_LIST__ = .);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
87 .dtors : { *(.dtors) }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
88 PROVIDE (__DTOR_END__ = .);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
89 PROVIDE (_FIXUP_START_ = .);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
90 .fixup : { *(.fixup) }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
91 PROVIDE (_FIXUP_END_ = .);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
92 PROVIDE (_GOT2_END_ = .);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
93 PROVIDE (_GOT_START_ = .);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
94 .got : { *(.got) }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
95 .got.plt : { *(.got.plt) }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
96 PROVIDE (_GOT_END_ = .);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
97 /* We want the small data sections together, so single-instruction offsets
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
98 can access them all, and initialized data all before uninitialized, so
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
99 we can shorten the on-disk segment size. */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
100 .sdata : { *(.sdata) }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
101 _edata = .;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
102 PROVIDE (edata = .);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
103 .sbss :
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
104 {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
105 }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
106 .bss :
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
107 {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
108 PROVIDE (__sbss_start = .);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
109 *(.sbss)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
110 *(.scommon)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
111 PROVIDE (__sbss_end = .);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
112 PROVIDE (__bss_start = .);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
113 *(.dynbss)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
114 *(.bss)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
115 *(COMMON)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
116 }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
117 _end = . ;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
118 PROVIDE (end = .);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
119 /* These are needed for ELF backends which have not yet been
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
120 converted to the new style linker. */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
121 .stab 0 : { *(.stab) }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
122 .stabstr 0 : { *(.stabstr) }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
123 /* DWARF debug sections.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
124 Symbols in the DWARF debugging sections are relative to the beginning
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
125 of the section so we begin them at 0. */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
126 /* DWARF 1 */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
127 .debug 0 : { *(.debug) }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
128 .line 0 : { *(.line) }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
129 /* GNU DWARF 1 extensions */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
130 .debug_srcinfo 0 : { *(.debug_srcinfo) }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
131 .debug_sfnames 0 : { *(.debug_sfnames) }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
132 /* DWARF 1.1 and DWARF 2 */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
133 .debug_aranges 0 : { *(.debug_aranges) }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
134 .debug_pubnames 0 : { *(.debug_pubnames) }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
135 /* DWARF 2 */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
136 .debug_info 0 : { *(.debug_info) }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
137 .debug_abbrev 0 : { *(.debug_abbrev) }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
138 .debug_line 0 : { *(.debug_line) }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
139 .debug_frame 0 : { *(.debug_frame) }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
140 .debug_str 0 : { *(.debug_str) }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
141 .debug_loc 0 : { *(.debug_loc) }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
142 .debug_macinfo 0 : { *(.debug_macinfo) }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
143 /* SGI/MIPS DWARF 2 extensions */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
144 .debug_weaknames 0 : { *(.debug_weaknames) }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
145 .debug_funcnames 0 : { *(.debug_funcnames) }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
146 .debug_typenames 0 : { *(.debug_typenames) }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
147 .debug_varnames 0 : { *(.debug_varnames) }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
148 /* These must appear regardless of . */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
149 }