• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
Keine Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

GNU Binutils with patches for OS216


Commit MetaInfo

Revision2fc047a63e36a7e2df3e9c021c0668d454f3f877 (tree)
Zeit2000-11-09 07:57:05
AutorNick Clifton <nickc@redh...>
CommiterNick Clifton

Log Message

Use ${CONSTRUCTING...} to enclose constructors and destructors.

Ändern Zusammenfassung

Diff

--- a/ld/ChangeLog
+++ b/ld/ChangeLog
@@ -1,3 +1,18 @@
1+2000-11-08 Nick Clifton <nickc@redhat.com>
2+
3+ * scripttempl/h8300.sc: Use ${CONSTRUCTING...} to enclose
4+ constructors and destructors.
5+ * scripttempl/h8300h.sc: Ditto.
6+ * scripttempl/h8300s.sc: Ditto.
7+ * scripttempl/h8500.sc: Ditto.
8+ * scripttempl/h8500b.sc: Ditto.
9+ * scripttempl/h8500c.sc: Ditto.
10+ * scripttempl/h8500m.sc: Ditto.
11+ * scripttempl/h8500s.sc: Ditto.
12+ * scripttempl/v850.sc: Ditto.
13+ * scripttempl/w65.sc: Ditto.
14+ * scripttempl/z8000.sc: Ditto.
15+
116 2000-11-06 Alan Modra <alan@linuxcare.com.au>
217
318 Merge most place_orphan changes from mainline.
--- a/ld/scripttempl/h8300.sc
+++ b/ld/scripttempl/h8300.sc
@@ -1,3 +1,13 @@
1+TORS=".tors :
2+ {
3+ ___ctors = . ;
4+ *(.ctors)
5+ ___ctors_end = . ;
6+ ___dtors = . ;
7+ *(.dtors)
8+ ___dtors_end = . ;
9+ } > ram"
10+
111 cat <<EOF
212 OUTPUT_FORMAT("${OUTPUT_FORMAT}")
313 OUTPUT_ARCH(${ARCH})
@@ -18,52 +28,60 @@ MEMORY
1828
1929 SECTIONS
2030 {
21-.vectors : {
22- /* Use something like this to place a specific function's address
23- into the vector table.
31+.vectors :
32+ {
33+ /* Use something like this to place a specific
34+ function's address into the vector table.
2435
25- SHORT(ABSOLUTE(_foobar)) */
36+ SHORT (ABSOLUTE (_foobar)). */
2637
27- *(.vectors)
38+ *(.vectors)
2839 } ${RELOCATING+ > vectors}
2940
30-.text : {
31- *(.rodata)
32- *(.text)
33- *(.strings)
34- ${RELOCATING+ _etext = . ; }
35- } ${RELOCATING+ > ram}
36-.tors : {
37- ___ctors = . ;
38- *(.ctors)
39- ___ctors_end = . ;
40- ___dtors = . ;
41- *(.dtors)
42- ___dtors_end = . ;
41+.text :
42+ {
43+ *(.rodata)
44+ *(.text)
45+ *(.strings)
46+ ${RELOCATING+ _etext = . ; }
4347 } ${RELOCATING+ > ram}
44-.data : {
45- *(.data)
46- *(.tiny)
47- ${RELOCATING+ _edata = . ; }
48+
49+ ${CONSTRUCTING+${TORS}}
50+
51+.data :
52+ {
53+ *(.data)
54+ *(.tiny)
55+ ${RELOCATING+ _edata = . ; }
4856 } ${RELOCATING+ > ram}
49-.bss : {
50- ${RELOCATING+ _bss_start = . ;}
51- *(.bss)
52- *(COMMON)
53- ${RELOCATING+ _end = . ; }
57+
58+.bss :
59+ {
60+ ${RELOCATING+ _bss_start = . ;}
61+ *(.bss)
62+ *(COMMON)
63+ ${RELOCATING+ _end = . ; }
5464 } ${RELOCATING+ >ram}
55-.stack : {
56- ${RELOCATING+ _stack = . ; }
57- *(.stack)
65+
66+.stack :
67+ {
68+ ${RELOCATING+ _stack = . ; }
69+ *(.stack)
5870 } ${RELOCATING+ > topram}
59-.eight : {
60- *(.eight)
71+
72+.eight :
73+ {
74+ *(.eight)
6175 } ${RELOCATING+ > eight}
62-.stab 0 ${RELOCATING+(NOLOAD)} : {
63- [ .stab ]
76+
77+.stab 0 ${RELOCATING+(NOLOAD)} :
78+ {
79+ [ .stab ]
6480 }
65-.stabstr 0 ${RELOCATING+(NOLOAD)} : {
66- [ .stabstr ]
81+
82+.stabstr 0 ${RELOCATING+(NOLOAD)} :
83+ {
84+ [ .stabstr ]
6785 }
6886 }
6987 EOF
--- a/ld/scripttempl/h8300h.sc
+++ b/ld/scripttempl/h8300h.sc
@@ -1,3 +1,13 @@
1+TORS=".tors :
2+ {
3+ ___ctors = . ;
4+ *(.ctors)
5+ ___ctors_end = . ;
6+ ___dtors = . ;
7+ *(.dtors)
8+ ___dtors_end = . ;
9+ } > ram"
10+
111 cat <<EOF
212 OUTPUT_FORMAT("${OUTPUT_FORMAT}")
313 OUTPUT_ARCH(h8300h)
@@ -24,53 +34,64 @@ MEMORY
2434
2535 SECTIONS
2636 {
27-.vectors : {
28- /* Use something like this to place a specific function's address
29- into the vector table.
37+.vectors :
38+ {
39+ /* Use something like this to place a specific
40+ function's address into the vector table.
3041
31- LONG(ABSOLUTE(_foobar)) */
42+ LONG (ABSOLUTE (_foobar)). */
3243
33- *(.vectors)
44+ *(.vectors)
3445 } ${RELOCATING+ > vectors}
35-.text : {
36- *(.rodata)
37- *(.text)
38- *(.strings)
39- ${RELOCATING+ _etext = . ; }
40- } ${RELOCATING+ > ram}
41-.tors : {
42- ___ctors = . ;
43- *(.ctors)
44- ___ctors_end = . ;
45- ___dtors = . ;
46- *(.dtors)
47- ___dtors_end = . ;
46+
47+.text :
48+ {
49+ *(.rodata)
50+ *(.text)
51+ *(.strings)
52+ ${RELOCATING+ _etext = . ; }
4853 } ${RELOCATING+ > ram}
49-.data : {
50- *(.data)
51- ${RELOCATING+ _edata = . ; }
54+
55+ ${CONSTRUCTING+${TORS}}
56+
57+.data :
58+ {
59+ *(.data)
60+ ${RELOCATING+ _edata = . ; }
5261 } ${RELOCATING+ > ram}
53-.bss : {
54- ${RELOCATING+ _bss_start = . ;}
55- *(.bss)
56- *(COMMON)
57- ${RELOCATING+ _end = . ; }
62+
63+.bss :
64+ {
65+ ${RELOCATING+ _bss_start = . ;}
66+ *(.bss)
67+ *(COMMON)
68+ ${RELOCATING+ _end = . ; }
5869 } ${RELOCATING+ >ram}
59-.stack : {
60- ${RELOCATING+ _stack = . ; }
61- *(.stack)
70+
71+.stack :
72+ {
73+ ${RELOCATING+ _stack = . ; }
74+ *(.stack)
6275 } ${RELOCATING+ > topram}
63-.tiny : {
64- *(.tiny)
76+
77+.tiny :
78+ {
79+ *(.tiny)
6580 } ${RELOCATING+ > tiny}
66-.eight : {
67- *(.eight)
81+
82+.eight :
83+ {
84+ *(.eight)
6885 } ${RELOCATING+ > eight}
69-.stab 0 ${RELOCATING+(NOLOAD)} : {
70- [ .stab ]
86+
87+.stab 0 ${RELOCATING+(NOLOAD)} :
88+ {
89+ [ .stab ]
7190 }
72-.stabstr 0 ${RELOCATING+(NOLOAD)} : {
73- [ .stabstr ]
91+
92+.stabstr 0 ${RELOCATING+(NOLOAD)} :
93+ {
94+ [ .stabstr ]
7495 }
7596 }
7697 EOF
--- a/ld/scripttempl/h8300s.sc
+++ b/ld/scripttempl/h8300s.sc
@@ -1,3 +1,13 @@
1+TORS=".tors :
2+ {
3+ ___ctors = . ;
4+ *(.ctors)
5+ ___ctors_end = . ;
6+ ___dtors = . ;
7+ *(.dtors)
8+ ___dtors_end = . ;
9+ } > ram"
10+
111 cat <<EOF
212 OUTPUT_FORMAT("${OUTPUT_FORMAT}")
313 OUTPUT_ARCH(h8300s)
@@ -24,53 +34,64 @@ MEMORY
2434
2535 SECTIONS
2636 {
27-.vectors : {
28- /* Use something like this to place a specific function's address
29- into the vector table.
37+.vectors :
38+ {
39+ /* Use something like this to place a specific function's address
40+ into the vector table.
3041
31- LONG(ABSOLUTE(_foobar)) */
42+ LONG (ABSOLUTE (_foobar)). */
3243
33- *(.vectors)
44+ *(.vectors)
3445 } ${RELOCATING+ > vectors}
35-.text : {
36- *(.rodata)
37- *(.text)
38- *(.strings)
39- ${RELOCATING+ _etext = . ; }
40- } ${RELOCATING+ > ram}
41-.tors : {
42- ___ctors = . ;
43- *(.ctors)
44- ___ctors_end = . ;
45- ___dtors = . ;
46- *(.dtors)
47- ___dtors_end = . ;
46+
47+.text :
48+ {
49+ *(.rodata)
50+ *(.text)
51+ *(.strings)
52+ ${RELOCATING+ _etext = . ; }
4853 } ${RELOCATING+ > ram}
49-.data : {
50- *(.data)
51- ${RELOCATING+ _edata = . ; }
54+
55+ ${CONSTRUCTING+${TORS}}
56+
57+.data :
58+ {
59+ *(.data)
60+ ${RELOCATING+ _edata = . ; }
5261 } ${RELOCATING+ > ram}
53-.bss : {
54- ${RELOCATING+ _bss_start = . ;}
55- *(.bss)
56- *(COMMON)
57- ${RELOCATING+ _end = . ; }
62+
63+.bss :
64+ {
65+ ${RELOCATING+ _bss_start = . ;}
66+ *(.bss)
67+ *(COMMON)
68+ ${RELOCATING+ _end = . ; }
5869 } ${RELOCATING+ >ram}
59-.stack : {
60- ${RELOCATING+ _stack = . ; }
61- *(.stack)
70+
71+.stack :
72+ {
73+ ${RELOCATING+ _stack = . ; }
74+ *(.stack)
6275 } ${RELOCATING+ > topram}
63-.tiny : {
64- *(.tiny)
76+
77+.tiny :
78+ {
79+ *(.tiny)
6580 } ${RELOCATING+ > tiny}
66-.eight : {
67- *(.eight)
81+
82+.eight :
83+ {
84+ *(.eight)
6885 } ${RELOCATING+ > eight}
69-.stab 0 ${RELOCATING+(NOLOAD)} : {
70- [ .stab ]
86+
87+.stab 0 ${RELOCATING+(NOLOAD)} :
88+ {
89+ [ .stab ]
7190 }
72-.stabstr 0 ${RELOCATING+(NOLOAD)} : {
73- [ .stabstr ]
91+
92+.stabstr 0 ${RELOCATING+(NOLOAD)} :
93+ {
94+ [ .stabstr ]
7495 }
7596 }
7697 EOF
--- a/ld/scripttempl/h8500.sc
+++ b/ld/scripttempl/h8500.sc
@@ -1,3 +1,11 @@
1+TORS="
2+ ___ctors = . ;
3+ *(.ctors)
4+ ___ctors_end = . ;
5+ ___dtors = . ;
6+ *(.dtors)
7+ ___dtors_end = . ;"
8+
19 cat <<EOF
210 OUTPUT_FORMAT("${OUTPUT_FORMAT}")
311 OUTPUT_ARCH(${ARCH})
@@ -8,52 +16,47 @@ SECTIONS
816 {
917 .text ${RELOCATING+ 0x0000 } :
1018 {
11- *(.text)
12-
13- ${RELOCATING+ _etext = . ; }
19+ *(.text)
20+ ${RELOCATING+ _etext = . ; }
1421 }
1522
16-
1723 .data ${RELOCATING+ . } :
1824 {
19- *(.data)
20- ${RELOCATING+ _edata = . ; }
25+ *(.data)
26+ ${RELOCATING+ _edata = . ; }
2127 }
2228
2329 .rdata ${RELOCATING+ . } :
2430 {
25- *(.rdata);
31+ *(.rdata);
2632 *(.strings)
27- ___ctors = . ;
28- *(.ctors)
29- ___ctors_end = . ;
30- ___dtors = . ;
31- *(.dtors)
32- ___dtors_end = . ;
33-}
33+
34+ ${CONSTRUCTING+${TORS}}
35+ }
3436
3537 .bss ${RELOCATING+ . } :
3638 {
37- ${RELOCATING+ __start_bss = . ; }
38- *(.bss)
39- *(COMMON)
40- ${RELOCATING+ _end = . ; }
39+ ${RELOCATING+ __start_bss = . ; }
40+ *(.bss)
41+ *(COMMON)
42+ ${RELOCATING+ _end = . ; }
4143 }
4244
4345 .stack ${RELOCATING+ 0xfff0} :
4446 {
45- ${RELOCATING+ _stack = . ; }
46- *(.stack)
47+ ${RELOCATING+ _stack = . ; }
48+ *(.stack)
4749 }
4850
49- .stab 0 ${RELOCATING+(NOLOAD)} :
50- {
51- [ .stab ]
52- }
53- .stabstr 0 ${RELOCATING+(NOLOAD)} :
54- {
55- [ .stabstr ]
56- }
51+.stab 0 ${RELOCATING+(NOLOAD)} :
52+ {
53+ [ .stab ]
54+ }
55+
56+.stabstr 0 ${RELOCATING+(NOLOAD)} :
57+ {
58+ [ .stabstr ]
59+ }
5760 }
5861 EOF
5962
--- a/ld/scripttempl/h8500b.sc
+++ b/ld/scripttempl/h8500b.sc
@@ -1,3 +1,11 @@
1+TORS="
2+ ___ctors = . ;
3+ *(.ctors)
4+ ___ctors_end = . ;
5+ ___dtors = . ;
6+ *(.dtors)
7+ ___dtors_end = . ;"
8+
19 cat <<EOF
210 OUTPUT_FORMAT("${OUTPUT_FORMAT}")
311 OUTPUT_ARCH(${ARCH})
@@ -24,13 +32,9 @@ SECTIONS
2432 {
2533 *(.rdata);
2634 *(.strings)
27- ___ctors = . ;
28- *(.ctors)
29- ___ctors_end = . ;
30- ___dtors = . ;
31- *(.dtors)
32- ___dtors_end = . ;
33-}
35+
36+ ${CONSTRUCTING+${TORS}}
37+ }
3438
3539 .bss ${RELOCATING+ 0x40000} :
3640 {
--- a/ld/scripttempl/h8500c.sc
+++ b/ld/scripttempl/h8500c.sc
@@ -1,3 +1,11 @@
1+TORS="
2+ ___ctors = . ;
3+ *(.ctors)
4+ ___ctors_end = . ;
5+ ___dtors = . ;
6+ *(.dtors)
7+ ___dtors_end = . ;"
8+
19 cat <<EOF
210 OUTPUT_FORMAT("${OUTPUT_FORMAT}")
311 OUTPUT_ARCH(${ARCH})
@@ -20,15 +28,12 @@ SECTIONS
2028 ${RELOCATING+ _edata = . ; }
2129 } ${RELOCATING+ > ram}
2230
23-.rdata 0x30000 : {
31+.rdata 0x30000 :
32+ {
2433 *(.rdata);
25- ___ctors = . ;
26- *(.ctors)
27- ___ctors_end = . ;
28- ___dtors = . ;
29- *(.dtors)
30- ___dtors_end = . ;
31-} ${RELOCATING+ > ram}
34+
35+ ${CONSTRUCTING+${TORS}}
36+ } ${RELOCATING+ > ram}
3237
3338 .bss 0x40000 :
3439 {
--- a/ld/scripttempl/h8500m.sc
+++ b/ld/scripttempl/h8500m.sc
@@ -1,3 +1,11 @@
1+TORS="
2+ ___ctors = . ;
3+ *(.ctors)
4+ ___ctors_end = . ;
5+ ___dtors = . ;
6+ *(.dtors)
7+ ___dtors_end = . ;"
8+
19 cat <<EOF
210 OUTPUT_FORMAT("${OUTPUT_FORMAT}")
311 OUTPUT_ARCH(${ARCH})
@@ -9,50 +17,46 @@ SECTIONS
917 .text ${RELOCATING+ 0x10000} :
1018 {
1119 *(.text)
12- ${RELOCATING+ _etext = . ; }
20+ ${RELOCATING+ _etext = . ; }
1321 }
1422
15-
1623 .data ${RELOCATING+ 0x20000} :
1724 {
18- *(.data)
19- ${RELOCATING+ _edata = . ; }
25+ *(.data)
26+ ${RELOCATING+ _edata = . ; }
2027 }
2128
2229 .rdata ${RELOCATING+ . } :
2330 {
24- *(.rdata);
31+ *(.rdata);
2532 *(.strings)
26- ___ctors = . ;
27- *(.ctors)
28- ___ctors_end = . ;
29- ___dtors = . ;
30- *(.dtors)
31- ___dtors_end = . ;
33+
34+ ${CONSTRUCTING+${TORS}}
3235 }
3336
3437 .bss ${RELOCATING+ . } :
3538 {
36- ${RELOCATING+ __start_bss = . ; }
37- *(.bss)
38- *(COMMON)
39- ${RELOCATING+ _end = . ; }
39+ ${RELOCATING+ __start_bss = . ; }
40+ *(.bss)
41+ *(COMMON)
42+ ${RELOCATING+ _end = . ; }
4043 }
4144
4245 .stack ${RELOCATING+ 0x2fff0} :
4346 {
44- ${RELOCATING+ _stack = . ; }
45- *(.stack)
47+ ${RELOCATING+ _stack = . ; }
48+ *(.stack)
4649 }
4750
48- .stab 0 ${RELOCATING+(NOLOAD)} :
49- {
50- [ .stab ]
51- }
52- .stabstr 0 ${RELOCATING+(NOLOAD)} :
53- {
54- [ .stabstr ]
55- }
51+.stab 0 ${RELOCATING+(NOLOAD)} :
52+ {
53+ [ .stab ]
54+ }
55+
56+.stabstr 0 ${RELOCATING+(NOLOAD)} :
57+ {
58+ [ .stabstr ]
59+ }
5660 }
5761 EOF
5862
--- a/ld/scripttempl/h8500s.sc
+++ b/ld/scripttempl/h8500s.sc
@@ -1,3 +1,11 @@
1+TORS="
2+ ___ctors = . ;
3+ *(.ctors)
4+ ___ctors_end = . ;
5+ ___dtors = . ;
6+ *(.dtors)
7+ ___dtors_end = . ;"
8+
19 cat <<EOF
210 OUTPUT_FORMAT("${OUTPUT_FORMAT}")
311 OUTPUT_ARCH(${ARCH})
@@ -8,50 +16,47 @@ SECTIONS
816 {
917 .text ${RELOCATING+ 0x10000 } :
1018 {
11- *(.text)
12- ${RELOCATING+ _etext = . ; }
19+ *(.text)
20+ ${RELOCATING+ _etext = . ; }
1321 }
1422
1523 .rdata ${RELOCATING+ 0x20000 } :
1624 {
17- *(.rdata);
18- *(.strings)
19- ___ctors = . ;
20- *(.ctors)
21- ___ctors_end = . ;
22- ___dtors = . ;
23- *(.dtors)
24- ___dtors_end = . ;
25+ *(.rdata);
26+ *(.strings)
27+
28+ ${CONSTRUCTING+${TORS}}
2529 }
2630
2731 .data ${RELOCATING+ . } :
2832 {
29- *(.data)
30- ${RELOCATING+ _edata = . ; }
33+ *(.data)
34+ ${RELOCATING+ _edata = . ; }
3135 }
3236
3337 .bss ${RELOCATING+ .} :
3438 {
35- ${RELOCATING+ __start_bss = . ; }
36- *(.bss)
37- *(COMMON)
38- ${RELOCATING+ _end = . ; }
39+ ${RELOCATING+ __start_bss = . ; }
40+ *(.bss)
41+ *(COMMON)
42+ ${RELOCATING+ _end = . ; }
3943 }
4044
4145 .stack ${RELOCATING+ 0x2fff0} :
4246 {
43- ${RELOCATING+ _stack = . ; }
44- *(.stack)
47+ ${RELOCATING+ _stack = . ; }
48+ *(.stack)
4549 }
4650
47- .stab 0 ${RELOCATING+(NOLOAD)} :
48- {
49- [ .stab ]
50- }
51- .stabstr 0 ${RELOCATING+(NOLOAD)} :
52- {
53- [ .stabstr ]
54- }
51+.stab 0 ${RELOCATING+(NOLOAD)} :
52+ {
53+ [ .stab ]
54+ }
55+
56+.stabstr 0 ${RELOCATING+(NOLOAD)} :
57+ {
58+ [ .stabstr ]
59+ }
5560 }
5661 EOF
5762
--- a/ld/scripttempl/v850.sc
+++ b/ld/scripttempl/v850.sc
@@ -4,13 +4,13 @@ OUTPUT_FORMAT("elf32-v850", "elf32-v850",
44 OUTPUT_ARCH(v850)
55 ENTRY(_start)
66 SEARCH_DIR(.);
7-/*/critters/slug/grossman/install/sun4/v850-elf/lib*/
87 SECTIONS
98 {
109 /* This saves a little space in the ELF file, since the zda starts
1110 at a higher location that the ELF headers take up. */
1211
13- .zdata ${ZDATA_START_ADDR} : {
12+ .zdata ${ZDATA_START_ADDR} :
13+ {
1414 *(.zdata)
1515 *(.zbss)
1616 *(reszdata)
@@ -23,13 +23,14 @@ SECTIONS
2323 section. Specifically it prevents the zdata
2424 section from being marked READONLY. */
2525
26- .rozdata ${ROZDATA_START_ADDR} : {
26+ .rozdata ${ROZDATA_START_ADDR} :
27+ {
2728 *(.rozdata)
2829 *(romzdata)
2930 *(romzbss)
3031 }
3132
32- /* Read-only sections, merged into text segment: */
33+ /* Read-only sections, merged into text segment. */
3334 . = ${TEXT_START_ADDR};
3435 .interp : { *(.interp) }
3536 .hash : { *(.hash) }
@@ -58,9 +59,11 @@ SECTIONS
5859 .init : { KEEP (*(.init)) } =0
5960 .plt : { *(.plt) }
6061
61- .text : {
62+ .text :
63+ {
6264 *(.text)
6365 ${RELOCATING+*(.text.*)}
66+
6467 /* .gnu.warning sections are handled specially by elf32.em. */
6568 *(.gnu.warning)
6669 *(.gnu.linkonce.t*)
@@ -73,45 +76,51 @@ SECTIONS
7376 It contains a small lookup table at the start followed by the
7477 code pointed to by entries in the lookup table. */
7578
76- .call_table_data ${CALL_TABLE_START_ADDR} : {
79+ .call_table_data ${CALL_TABLE_START_ADDR} :
80+ {
7781 ${RELOCATING+PROVIDE(__ctbp = .);}
7882 *(.call_table_data)
79- } = 0xff /* fill gaps with 0xff */
80- .call_table_text : {
83+ } = 0xff /* Fill gaps with 0xff. */
84+
85+ .call_table_text :
86+ {
8187 *(.call_table_text)
8288 }
8389
84- .fini : { KEEP (*(.fini)) } =0
90+ .fini : { KEEP (*(.fini)) } =0
8591 .rodata : { *(.rodata) ${RELOCATING+*(.rodata.*)} *(.gnu.linkonce.r*) }
8692 .rodata1 : { *(.rodata1) }
8793
88- .data : {
94+ .data :
95+ {
8996 *(.data)
9097 ${RELOCATING+*(.data.*)}
9198 *(.gnu.linkonce.d*)
9299 CONSTRUCTORS
93100 }
94101 .data1 : { *(.data1) }
95- .ctors : {
96- ${RELOCATING+___ctors = .;}
102+ .ctors :
103+ {
104+ ${CONSTRUCTING+___ctors = .;}
97105 KEEP (*(EXCLUDE_FILE (*crtend.o) .ctors))
98106 KEEP (*(SORT(.ctors.*)))
99107 KEEP (*crtend(.ctors))
100- ${RELOCATING+___ctors_end = .;}
108+ ${CONSTRUCTING+___ctors_end = .;}
101109 }
102-
103- .dtors : {
104- ${RELOCATING+___dtors = .;}
110+ .dtors :
111+ {
112+ ${CONSTRUCTING+___dtors = .;}
105113 KEEP (*(EXCLUDE_FILE (*crtend.o) .dtors))
106114 KEEP (*(SORT(.dtors.*)))
107115 KEEP (*crtend.o(.dtors))
108- ${RELOCATING+___dtors_end = .;}
116+ ${CONSTRUCTING+___dtors_end = .;}
109117 }
110118
111119 .got : { *(.got.plt) *(.got) }
112120 .dynamic : { *(.dynamic) }
113121
114- .tdata ${TDATA_START_ADDR} : {
122+ .tdata ${TDATA_START_ADDR} :
123+ {
115124 ${RELOCATING+PROVIDE (__ep = .);}
116125 *(.tbyte)
117126 *(.tcommon_byte)
@@ -123,21 +132,26 @@ SECTIONS
123132 /* We want the small data sections together, so single-instruction offsets
124133 can access them all, and initialized data all before uninitialized, so
125134 we can shorten the on-disk segment size. */
126- .sdata ${SDATA_START_ADDR} : {
135+
136+ .sdata ${SDATA_START_ADDR} :
137+ {
127138 ${RELOCATING+PROVIDE (__gp = . + 0x8000);}
128139 *(.sdata)
129140 }
130141
131142 /* See comment about .rozdata. */
132- .rosdata ${ROSDATA_START_ADDR} : {
143+ .rosdata ${ROSDATA_START_ADDR} :
144+ {
133145 *(.rosdata)
134146 }
135147
136148 /* We place the .sbss data section AFTER the .rosdata section, so that
137149 it can directly preceed the .bss section. This allows runtime startup
138150 code to initialise all the zero-data sections by simply taking the
139- value of '_edata' and zeroing until it reaches '_end' */
140- .sbss : {
151+ value of '_edata' and zeroing until it reaches '_end'. */
152+
153+ .sbss :
154+ {
141155 ${RELOCATING+__sbss_start = .;}
142156 *(.sbss)
143157 *(.scommon)
@@ -184,7 +198,7 @@ SECTIONS
184198 .debug_pubnames 0 : { *(.debug_pubnames) }
185199
186200 /* DWARF 2 */
187- .debug_info 0 : { *(.debug_info) }
201+ .debug_info 0 : { *(.debug_info) *(.gnu.linkonce.wi.*) }
188202 .debug_abbrev 0 : { *(.debug_abbrev) }
189203 .debug_line 0 : { *(.debug_line) }
190204 .debug_frame 0 : { *(.debug_frame) }
@@ -192,17 +206,17 @@ SECTIONS
192206 .debug_loc 0 : { *(.debug_loc) }
193207 .debug_macinfo 0 : { *(.debug_macinfo) }
194208
195- /* SGI/MIPS DWARF 2 extensions */
209+ /* SGI/MIPS DWARF 2 extensions. */
196210 .debug_weaknames 0 : { *(.debug_weaknames) }
197211 .debug_funcnames 0 : { *(.debug_funcnames) }
198212 .debug_typenames 0 : { *(.debug_typenames) }
199213 .debug_varnames 0 : { *(.debug_varnames) }
200214
201- /* User stack */
202- .stack 0x200000 : {
215+ /* User stack. */
216+ .stack 0x200000 :
217+ {
203218 ${RELOCATING+__stack = .;}
204219 *(.stack)
205220 }
206- /* These must appear regardless of . */
207221 }
208222 EOF
--- a/ld/scripttempl/w65.sc
+++ b/ld/scripttempl/w65.sc
@@ -1,10 +1,21 @@
1+TORS=".tors :
2+ {
3+ ___ctors = . ;
4+ *(.ctors)
5+ ___ctors_end = . ;
6+ ___dtors = . ;
7+ *(.dtors)
8+ ___dtors_end = . ;
9+ } > ram"
10+
111 cat <<EOF
212 OUTPUT_FORMAT("${OUTPUT_FORMAT}")
313 OUTPUT_ARCH(${ARCH})
414
5-MEMORY {
15+MEMORY
16+{
617 ram : o = 0x1000, l = 512k
7- }
18+}
819
920 SECTIONS
1021 {
@@ -12,44 +23,40 @@ SECTIONS
1223 {
1324 *(.text)
1425 *(.strings)
15- ${RELOCATING+ _etext = . ; }
26+ ${RELOCATING+ _etext = . ; }
1627 } ${RELOCATING+ > ram}
1728
18-
19-.tors : {
20- ___ctors = . ;
21- *(.ctors)
22- ___ctors_end = . ;
23- ___dtors = . ;
24- *(.dtors)
25- ___dtors_end = . ;
26-} ${RELOCATING+ > ram}
29+ ${CONSTRUCTING+${TORS}}
2730
2831 .data :
2932 {
30- *(.data)
31- ${RELOCATING+ _edata = . ; }
33+ *(.data)
34+ ${RELOCATING+ _edata = . ; }
3235 } ${RELOCATING+ > ram}
36+
3337 .bss :
3438 {
35- ${RELOCATING+ _bss_start = . ; }
36- *(.bss)
37- *(COMMON)
38- ${RELOCATING+ _end = . ; }
39+ ${RELOCATING+ _bss_start = . ; }
40+ *(.bss)
41+ *(COMMON)
42+ ${RELOCATING+ _end = . ; }
3943 } ${RELOCATING+ >ram}
40-.stack ${RELOCATING+ 0x30000 } :
44+
45+.stack ${RELOCATING+ 0x30000 } :
4146 {
42- ${RELOCATING+ _stack = . ; }
43- *(.stack)
47+ ${RELOCATING+ _stack = . ; }
48+ *(.stack)
4449 } ${RELOCATING+ > ram}
45- .stab . (NOLOAD) :
46- {
47- [ .stab ]
48- }
49- .stabstr . (NOLOAD) :
50- {
51- [ .stabstr ]
52- }
50+
51+.stab . (NOLOAD) :
52+ {
53+ [ .stab ]
54+ }
55+
56+.stabstr . (NOLOAD) :
57+ {
58+ [ .stabstr ]
59+ }
5360 }
5461 EOF
5562
--- a/ld/scripttempl/z8000.sc
+++ b/ld/scripttempl/z8000.sc
@@ -5,7 +5,8 @@ ENTRY(_start)
55
66 SECTIONS
77 {
8-.text ${BIG+ ${RELOCATING+ 0x0000000}} : {
8+.text ${BIG+ ${RELOCATING+ 0x0000000}} :
9+ {
910 *(.text)
1011 *(.strings)
1112 *(.rdata)
@@ -13,38 +14,40 @@ SECTIONS
1314
1415 .ctors ${BIG+ ${RELOCATING+ 0x2000000}} :
1516 {
16- ${RELOCATING+ ___ctors = . ; }
17+ ${CONSTRUCTING+ ___ctors = . ; }
1718 *(.ctors);
18- ${RELOCATING+ ___ctors_end = . ; }
19+ ${CONSTRUCTING+ ___ctors_end = . ; }
1920 ___dtors = . ;
2021 *(.dtors);
21- ${RELOCATING+ ___dtors_end = . ; }
22+ ${CONSTRUCTING+ ___dtors_end = . ; }
2223 }
2324
24-.data ${BIG+ ${RELOCATING+ 0x3000000}} : {
25- *(.data)
25+.data ${BIG+ ${RELOCATING+ 0x3000000}} :
26+ {
27+ *(.data)
2628 }
2729
2830 .bss ${BIG+ ${RELOCATING+ 0x4000000}} :
29- {
30- ${RELOCATING+ __start_bss = . ; }
31- *(.bss);
32- *(COMMON);
33- ${RELOCATING+ __end_bss = . ; }
34- }
35-
36-.heap ${BIG+ ${RELOCATING+ 0x5000000}} : {
37- ${RELOCATING+ __start_heap = . ; }
38- ${RELOCATING+ . = . + 20k ; }
39- ${RELOCATING+ __end_heap = . ; }
31+ {
32+ ${RELOCATING+ __start_bss = . ; }
33+ *(.bss);
34+ *(COMMON);
35+ ${RELOCATING+ __end_bss = . ; }
36+ }
37+
38+.heap ${BIG+ ${RELOCATING+ 0x5000000}} :
39+ {
40+ ${RELOCATING+ __start_heap = . ; }
41+ ${RELOCATING+ . = . + 20k ; }
42+ ${RELOCATING+ __end_heap = . ; }
4043 }
4144
4245 .stack ${RELOCATING+ 0xf000 } :
4346 {
44- ${RELOCATING+ _stack = . ; }
45- *(.stack)
46- ${RELOCATING+ __stack_top = . ; }
47- }
47+ ${RELOCATING+ _stack = . ; }
48+ *(.stack)
49+ ${RELOCATING+ __stack_top = . ; }
50+ }
4851
4952 }
5053 EOF