GNU Binutils with patches for OS216
Revision | 2fc047a63e36a7e2df3e9c021c0668d454f3f877 (tree) |
---|---|
Zeit | 2000-11-09 07:57:05 |
Autor | Nick Clifton <nickc@redh...> |
Commiter | Nick Clifton |
Use ${CONSTRUCTING...} to enclose constructors and destructors.
@@ -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 | + | |
1 | 16 | 2000-11-06 Alan Modra <alan@linuxcare.com.au> |
2 | 17 | |
3 | 18 | Merge most place_orphan changes from mainline. |
@@ -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 | + | |
1 | 11 | cat <<EOF |
2 | 12 | OUTPUT_FORMAT("${OUTPUT_FORMAT}") |
3 | 13 | OUTPUT_ARCH(${ARCH}) |
@@ -18,52 +28,60 @@ MEMORY | ||
18 | 28 | |
19 | 29 | SECTIONS |
20 | 30 | { |
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. | |
24 | 35 | |
25 | - SHORT(ABSOLUTE(_foobar)) */ | |
36 | + SHORT (ABSOLUTE (_foobar)). */ | |
26 | 37 | |
27 | - *(.vectors) | |
38 | + *(.vectors) | |
28 | 39 | } ${RELOCATING+ > vectors} |
29 | 40 | |
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 = . ; } | |
43 | 47 | } ${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 = . ; } | |
48 | 56 | } ${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 = . ; } | |
54 | 64 | } ${RELOCATING+ >ram} |
55 | -.stack : { | |
56 | - ${RELOCATING+ _stack = . ; } | |
57 | - *(.stack) | |
65 | + | |
66 | +.stack : | |
67 | + { | |
68 | + ${RELOCATING+ _stack = . ; } | |
69 | + *(.stack) | |
58 | 70 | } ${RELOCATING+ > topram} |
59 | -.eight : { | |
60 | - *(.eight) | |
71 | + | |
72 | +.eight : | |
73 | + { | |
74 | + *(.eight) | |
61 | 75 | } ${RELOCATING+ > eight} |
62 | -.stab 0 ${RELOCATING+(NOLOAD)} : { | |
63 | - [ .stab ] | |
76 | + | |
77 | +.stab 0 ${RELOCATING+(NOLOAD)} : | |
78 | + { | |
79 | + [ .stab ] | |
64 | 80 | } |
65 | -.stabstr 0 ${RELOCATING+(NOLOAD)} : { | |
66 | - [ .stabstr ] | |
81 | + | |
82 | +.stabstr 0 ${RELOCATING+(NOLOAD)} : | |
83 | + { | |
84 | + [ .stabstr ] | |
67 | 85 | } |
68 | 86 | } |
69 | 87 | EOF |
@@ -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 | + | |
1 | 11 | cat <<EOF |
2 | 12 | OUTPUT_FORMAT("${OUTPUT_FORMAT}") |
3 | 13 | OUTPUT_ARCH(h8300h) |
@@ -24,53 +34,64 @@ MEMORY | ||
24 | 34 | |
25 | 35 | SECTIONS |
26 | 36 | { |
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. | |
30 | 41 | |
31 | - LONG(ABSOLUTE(_foobar)) */ | |
42 | + LONG (ABSOLUTE (_foobar)). */ | |
32 | 43 | |
33 | - *(.vectors) | |
44 | + *(.vectors) | |
34 | 45 | } ${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 = . ; } | |
48 | 53 | } ${RELOCATING+ > ram} |
49 | -.data : { | |
50 | - *(.data) | |
51 | - ${RELOCATING+ _edata = . ; } | |
54 | + | |
55 | + ${CONSTRUCTING+${TORS}} | |
56 | + | |
57 | +.data : | |
58 | + { | |
59 | + *(.data) | |
60 | + ${RELOCATING+ _edata = . ; } | |
52 | 61 | } ${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 = . ; } | |
58 | 69 | } ${RELOCATING+ >ram} |
59 | -.stack : { | |
60 | - ${RELOCATING+ _stack = . ; } | |
61 | - *(.stack) | |
70 | + | |
71 | +.stack : | |
72 | + { | |
73 | + ${RELOCATING+ _stack = . ; } | |
74 | + *(.stack) | |
62 | 75 | } ${RELOCATING+ > topram} |
63 | -.tiny : { | |
64 | - *(.tiny) | |
76 | + | |
77 | +.tiny : | |
78 | + { | |
79 | + *(.tiny) | |
65 | 80 | } ${RELOCATING+ > tiny} |
66 | -.eight : { | |
67 | - *(.eight) | |
81 | + | |
82 | +.eight : | |
83 | + { | |
84 | + *(.eight) | |
68 | 85 | } ${RELOCATING+ > eight} |
69 | -.stab 0 ${RELOCATING+(NOLOAD)} : { | |
70 | - [ .stab ] | |
86 | + | |
87 | +.stab 0 ${RELOCATING+(NOLOAD)} : | |
88 | + { | |
89 | + [ .stab ] | |
71 | 90 | } |
72 | -.stabstr 0 ${RELOCATING+(NOLOAD)} : { | |
73 | - [ .stabstr ] | |
91 | + | |
92 | +.stabstr 0 ${RELOCATING+(NOLOAD)} : | |
93 | + { | |
94 | + [ .stabstr ] | |
74 | 95 | } |
75 | 96 | } |
76 | 97 | EOF |
@@ -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 | + | |
1 | 11 | cat <<EOF |
2 | 12 | OUTPUT_FORMAT("${OUTPUT_FORMAT}") |
3 | 13 | OUTPUT_ARCH(h8300s) |
@@ -24,53 +34,64 @@ MEMORY | ||
24 | 34 | |
25 | 35 | SECTIONS |
26 | 36 | { |
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. | |
30 | 41 | |
31 | - LONG(ABSOLUTE(_foobar)) */ | |
42 | + LONG (ABSOLUTE (_foobar)). */ | |
32 | 43 | |
33 | - *(.vectors) | |
44 | + *(.vectors) | |
34 | 45 | } ${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 = . ; } | |
48 | 53 | } ${RELOCATING+ > ram} |
49 | -.data : { | |
50 | - *(.data) | |
51 | - ${RELOCATING+ _edata = . ; } | |
54 | + | |
55 | + ${CONSTRUCTING+${TORS}} | |
56 | + | |
57 | +.data : | |
58 | + { | |
59 | + *(.data) | |
60 | + ${RELOCATING+ _edata = . ; } | |
52 | 61 | } ${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 = . ; } | |
58 | 69 | } ${RELOCATING+ >ram} |
59 | -.stack : { | |
60 | - ${RELOCATING+ _stack = . ; } | |
61 | - *(.stack) | |
70 | + | |
71 | +.stack : | |
72 | + { | |
73 | + ${RELOCATING+ _stack = . ; } | |
74 | + *(.stack) | |
62 | 75 | } ${RELOCATING+ > topram} |
63 | -.tiny : { | |
64 | - *(.tiny) | |
76 | + | |
77 | +.tiny : | |
78 | + { | |
79 | + *(.tiny) | |
65 | 80 | } ${RELOCATING+ > tiny} |
66 | -.eight : { | |
67 | - *(.eight) | |
81 | + | |
82 | +.eight : | |
83 | + { | |
84 | + *(.eight) | |
68 | 85 | } ${RELOCATING+ > eight} |
69 | -.stab 0 ${RELOCATING+(NOLOAD)} : { | |
70 | - [ .stab ] | |
86 | + | |
87 | +.stab 0 ${RELOCATING+(NOLOAD)} : | |
88 | + { | |
89 | + [ .stab ] | |
71 | 90 | } |
72 | -.stabstr 0 ${RELOCATING+(NOLOAD)} : { | |
73 | - [ .stabstr ] | |
91 | + | |
92 | +.stabstr 0 ${RELOCATING+(NOLOAD)} : | |
93 | + { | |
94 | + [ .stabstr ] | |
74 | 95 | } |
75 | 96 | } |
76 | 97 | EOF |
@@ -1,3 +1,11 @@ | ||
1 | +TORS=" | |
2 | + ___ctors = . ; | |
3 | + *(.ctors) | |
4 | + ___ctors_end = . ; | |
5 | + ___dtors = . ; | |
6 | + *(.dtors) | |
7 | + ___dtors_end = . ;" | |
8 | + | |
1 | 9 | cat <<EOF |
2 | 10 | OUTPUT_FORMAT("${OUTPUT_FORMAT}") |
3 | 11 | OUTPUT_ARCH(${ARCH}) |
@@ -8,52 +16,47 @@ SECTIONS | ||
8 | 16 | { |
9 | 17 | .text ${RELOCATING+ 0x0000 } : |
10 | 18 | { |
11 | - *(.text) | |
12 | - | |
13 | - ${RELOCATING+ _etext = . ; } | |
19 | + *(.text) | |
20 | + ${RELOCATING+ _etext = . ; } | |
14 | 21 | } |
15 | 22 | |
16 | - | |
17 | 23 | .data ${RELOCATING+ . } : |
18 | 24 | { |
19 | - *(.data) | |
20 | - ${RELOCATING+ _edata = . ; } | |
25 | + *(.data) | |
26 | + ${RELOCATING+ _edata = . ; } | |
21 | 27 | } |
22 | 28 | |
23 | 29 | .rdata ${RELOCATING+ . } : |
24 | 30 | { |
25 | - *(.rdata); | |
31 | + *(.rdata); | |
26 | 32 | *(.strings) |
27 | - ___ctors = . ; | |
28 | - *(.ctors) | |
29 | - ___ctors_end = . ; | |
30 | - ___dtors = . ; | |
31 | - *(.dtors) | |
32 | - ___dtors_end = . ; | |
33 | -} | |
33 | + | |
34 | + ${CONSTRUCTING+${TORS}} | |
35 | + } | |
34 | 36 | |
35 | 37 | .bss ${RELOCATING+ . } : |
36 | 38 | { |
37 | - ${RELOCATING+ __start_bss = . ; } | |
38 | - *(.bss) | |
39 | - *(COMMON) | |
40 | - ${RELOCATING+ _end = . ; } | |
39 | + ${RELOCATING+ __start_bss = . ; } | |
40 | + *(.bss) | |
41 | + *(COMMON) | |
42 | + ${RELOCATING+ _end = . ; } | |
41 | 43 | } |
42 | 44 | |
43 | 45 | .stack ${RELOCATING+ 0xfff0} : |
44 | 46 | { |
45 | - ${RELOCATING+ _stack = . ; } | |
46 | - *(.stack) | |
47 | + ${RELOCATING+ _stack = . ; } | |
48 | + *(.stack) | |
47 | 49 | } |
48 | 50 | |
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 | + } | |
57 | 60 | } |
58 | 61 | EOF |
59 | 62 |
@@ -1,3 +1,11 @@ | ||
1 | +TORS=" | |
2 | + ___ctors = . ; | |
3 | + *(.ctors) | |
4 | + ___ctors_end = . ; | |
5 | + ___dtors = . ; | |
6 | + *(.dtors) | |
7 | + ___dtors_end = . ;" | |
8 | + | |
1 | 9 | cat <<EOF |
2 | 10 | OUTPUT_FORMAT("${OUTPUT_FORMAT}") |
3 | 11 | OUTPUT_ARCH(${ARCH}) |
@@ -24,13 +32,9 @@ SECTIONS | ||
24 | 32 | { |
25 | 33 | *(.rdata); |
26 | 34 | *(.strings) |
27 | - ___ctors = . ; | |
28 | - *(.ctors) | |
29 | - ___ctors_end = . ; | |
30 | - ___dtors = . ; | |
31 | - *(.dtors) | |
32 | - ___dtors_end = . ; | |
33 | -} | |
35 | + | |
36 | + ${CONSTRUCTING+${TORS}} | |
37 | + } | |
34 | 38 | |
35 | 39 | .bss ${RELOCATING+ 0x40000} : |
36 | 40 | { |
@@ -1,3 +1,11 @@ | ||
1 | +TORS=" | |
2 | + ___ctors = . ; | |
3 | + *(.ctors) | |
4 | + ___ctors_end = . ; | |
5 | + ___dtors = . ; | |
6 | + *(.dtors) | |
7 | + ___dtors_end = . ;" | |
8 | + | |
1 | 9 | cat <<EOF |
2 | 10 | OUTPUT_FORMAT("${OUTPUT_FORMAT}") |
3 | 11 | OUTPUT_ARCH(${ARCH}) |
@@ -20,15 +28,12 @@ SECTIONS | ||
20 | 28 | ${RELOCATING+ _edata = . ; } |
21 | 29 | } ${RELOCATING+ > ram} |
22 | 30 | |
23 | -.rdata 0x30000 : { | |
31 | +.rdata 0x30000 : | |
32 | + { | |
24 | 33 | *(.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} | |
32 | 37 | |
33 | 38 | .bss 0x40000 : |
34 | 39 | { |
@@ -1,3 +1,11 @@ | ||
1 | +TORS=" | |
2 | + ___ctors = . ; | |
3 | + *(.ctors) | |
4 | + ___ctors_end = . ; | |
5 | + ___dtors = . ; | |
6 | + *(.dtors) | |
7 | + ___dtors_end = . ;" | |
8 | + | |
1 | 9 | cat <<EOF |
2 | 10 | OUTPUT_FORMAT("${OUTPUT_FORMAT}") |
3 | 11 | OUTPUT_ARCH(${ARCH}) |
@@ -9,50 +17,46 @@ SECTIONS | ||
9 | 17 | .text ${RELOCATING+ 0x10000} : |
10 | 18 | { |
11 | 19 | *(.text) |
12 | - ${RELOCATING+ _etext = . ; } | |
20 | + ${RELOCATING+ _etext = . ; } | |
13 | 21 | } |
14 | 22 | |
15 | - | |
16 | 23 | .data ${RELOCATING+ 0x20000} : |
17 | 24 | { |
18 | - *(.data) | |
19 | - ${RELOCATING+ _edata = . ; } | |
25 | + *(.data) | |
26 | + ${RELOCATING+ _edata = . ; } | |
20 | 27 | } |
21 | 28 | |
22 | 29 | .rdata ${RELOCATING+ . } : |
23 | 30 | { |
24 | - *(.rdata); | |
31 | + *(.rdata); | |
25 | 32 | *(.strings) |
26 | - ___ctors = . ; | |
27 | - *(.ctors) | |
28 | - ___ctors_end = . ; | |
29 | - ___dtors = . ; | |
30 | - *(.dtors) | |
31 | - ___dtors_end = . ; | |
33 | + | |
34 | + ${CONSTRUCTING+${TORS}} | |
32 | 35 | } |
33 | 36 | |
34 | 37 | .bss ${RELOCATING+ . } : |
35 | 38 | { |
36 | - ${RELOCATING+ __start_bss = . ; } | |
37 | - *(.bss) | |
38 | - *(COMMON) | |
39 | - ${RELOCATING+ _end = . ; } | |
39 | + ${RELOCATING+ __start_bss = . ; } | |
40 | + *(.bss) | |
41 | + *(COMMON) | |
42 | + ${RELOCATING+ _end = . ; } | |
40 | 43 | } |
41 | 44 | |
42 | 45 | .stack ${RELOCATING+ 0x2fff0} : |
43 | 46 | { |
44 | - ${RELOCATING+ _stack = . ; } | |
45 | - *(.stack) | |
47 | + ${RELOCATING+ _stack = . ; } | |
48 | + *(.stack) | |
46 | 49 | } |
47 | 50 | |
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 | + } | |
56 | 60 | } |
57 | 61 | EOF |
58 | 62 |
@@ -1,3 +1,11 @@ | ||
1 | +TORS=" | |
2 | + ___ctors = . ; | |
3 | + *(.ctors) | |
4 | + ___ctors_end = . ; | |
5 | + ___dtors = . ; | |
6 | + *(.dtors) | |
7 | + ___dtors_end = . ;" | |
8 | + | |
1 | 9 | cat <<EOF |
2 | 10 | OUTPUT_FORMAT("${OUTPUT_FORMAT}") |
3 | 11 | OUTPUT_ARCH(${ARCH}) |
@@ -8,50 +16,47 @@ SECTIONS | ||
8 | 16 | { |
9 | 17 | .text ${RELOCATING+ 0x10000 } : |
10 | 18 | { |
11 | - *(.text) | |
12 | - ${RELOCATING+ _etext = . ; } | |
19 | + *(.text) | |
20 | + ${RELOCATING+ _etext = . ; } | |
13 | 21 | } |
14 | 22 | |
15 | 23 | .rdata ${RELOCATING+ 0x20000 } : |
16 | 24 | { |
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}} | |
25 | 29 | } |
26 | 30 | |
27 | 31 | .data ${RELOCATING+ . } : |
28 | 32 | { |
29 | - *(.data) | |
30 | - ${RELOCATING+ _edata = . ; } | |
33 | + *(.data) | |
34 | + ${RELOCATING+ _edata = . ; } | |
31 | 35 | } |
32 | 36 | |
33 | 37 | .bss ${RELOCATING+ .} : |
34 | 38 | { |
35 | - ${RELOCATING+ __start_bss = . ; } | |
36 | - *(.bss) | |
37 | - *(COMMON) | |
38 | - ${RELOCATING+ _end = . ; } | |
39 | + ${RELOCATING+ __start_bss = . ; } | |
40 | + *(.bss) | |
41 | + *(COMMON) | |
42 | + ${RELOCATING+ _end = . ; } | |
39 | 43 | } |
40 | 44 | |
41 | 45 | .stack ${RELOCATING+ 0x2fff0} : |
42 | 46 | { |
43 | - ${RELOCATING+ _stack = . ; } | |
44 | - *(.stack) | |
47 | + ${RELOCATING+ _stack = . ; } | |
48 | + *(.stack) | |
45 | 49 | } |
46 | 50 | |
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 | + } | |
55 | 60 | } |
56 | 61 | EOF |
57 | 62 |
@@ -4,13 +4,13 @@ OUTPUT_FORMAT("elf32-v850", "elf32-v850", | ||
4 | 4 | OUTPUT_ARCH(v850) |
5 | 5 | ENTRY(_start) |
6 | 6 | SEARCH_DIR(.); |
7 | -/*/critters/slug/grossman/install/sun4/v850-elf/lib*/ | |
8 | 7 | SECTIONS |
9 | 8 | { |
10 | 9 | /* This saves a little space in the ELF file, since the zda starts |
11 | 10 | at a higher location that the ELF headers take up. */ |
12 | 11 | |
13 | - .zdata ${ZDATA_START_ADDR} : { | |
12 | + .zdata ${ZDATA_START_ADDR} : | |
13 | + { | |
14 | 14 | *(.zdata) |
15 | 15 | *(.zbss) |
16 | 16 | *(reszdata) |
@@ -23,13 +23,14 @@ SECTIONS | ||
23 | 23 | section. Specifically it prevents the zdata |
24 | 24 | section from being marked READONLY. */ |
25 | 25 | |
26 | - .rozdata ${ROZDATA_START_ADDR} : { | |
26 | + .rozdata ${ROZDATA_START_ADDR} : | |
27 | + { | |
27 | 28 | *(.rozdata) |
28 | 29 | *(romzdata) |
29 | 30 | *(romzbss) |
30 | 31 | } |
31 | 32 | |
32 | - /* Read-only sections, merged into text segment: */ | |
33 | + /* Read-only sections, merged into text segment. */ | |
33 | 34 | . = ${TEXT_START_ADDR}; |
34 | 35 | .interp : { *(.interp) } |
35 | 36 | .hash : { *(.hash) } |
@@ -58,9 +59,11 @@ SECTIONS | ||
58 | 59 | .init : { KEEP (*(.init)) } =0 |
59 | 60 | .plt : { *(.plt) } |
60 | 61 | |
61 | - .text : { | |
62 | + .text : | |
63 | + { | |
62 | 64 | *(.text) |
63 | 65 | ${RELOCATING+*(.text.*)} |
66 | + | |
64 | 67 | /* .gnu.warning sections are handled specially by elf32.em. */ |
65 | 68 | *(.gnu.warning) |
66 | 69 | *(.gnu.linkonce.t*) |
@@ -73,45 +76,51 @@ SECTIONS | ||
73 | 76 | It contains a small lookup table at the start followed by the |
74 | 77 | code pointed to by entries in the lookup table. */ |
75 | 78 | |
76 | - .call_table_data ${CALL_TABLE_START_ADDR} : { | |
79 | + .call_table_data ${CALL_TABLE_START_ADDR} : | |
80 | + { | |
77 | 81 | ${RELOCATING+PROVIDE(__ctbp = .);} |
78 | 82 | *(.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 | + { | |
81 | 87 | *(.call_table_text) |
82 | 88 | } |
83 | 89 | |
84 | - .fini : { KEEP (*(.fini)) } =0 | |
90 | + .fini : { KEEP (*(.fini)) } =0 | |
85 | 91 | .rodata : { *(.rodata) ${RELOCATING+*(.rodata.*)} *(.gnu.linkonce.r*) } |
86 | 92 | .rodata1 : { *(.rodata1) } |
87 | 93 | |
88 | - .data : { | |
94 | + .data : | |
95 | + { | |
89 | 96 | *(.data) |
90 | 97 | ${RELOCATING+*(.data.*)} |
91 | 98 | *(.gnu.linkonce.d*) |
92 | 99 | CONSTRUCTORS |
93 | 100 | } |
94 | 101 | .data1 : { *(.data1) } |
95 | - .ctors : { | |
96 | - ${RELOCATING+___ctors = .;} | |
102 | + .ctors : | |
103 | + { | |
104 | + ${CONSTRUCTING+___ctors = .;} | |
97 | 105 | KEEP (*(EXCLUDE_FILE (*crtend.o) .ctors)) |
98 | 106 | KEEP (*(SORT(.ctors.*))) |
99 | 107 | KEEP (*crtend(.ctors)) |
100 | - ${RELOCATING+___ctors_end = .;} | |
108 | + ${CONSTRUCTING+___ctors_end = .;} | |
101 | 109 | } |
102 | - | |
103 | - .dtors : { | |
104 | - ${RELOCATING+___dtors = .;} | |
110 | + .dtors : | |
111 | + { | |
112 | + ${CONSTRUCTING+___dtors = .;} | |
105 | 113 | KEEP (*(EXCLUDE_FILE (*crtend.o) .dtors)) |
106 | 114 | KEEP (*(SORT(.dtors.*))) |
107 | 115 | KEEP (*crtend.o(.dtors)) |
108 | - ${RELOCATING+___dtors_end = .;} | |
116 | + ${CONSTRUCTING+___dtors_end = .;} | |
109 | 117 | } |
110 | 118 | |
111 | 119 | .got : { *(.got.plt) *(.got) } |
112 | 120 | .dynamic : { *(.dynamic) } |
113 | 121 | |
114 | - .tdata ${TDATA_START_ADDR} : { | |
122 | + .tdata ${TDATA_START_ADDR} : | |
123 | + { | |
115 | 124 | ${RELOCATING+PROVIDE (__ep = .);} |
116 | 125 | *(.tbyte) |
117 | 126 | *(.tcommon_byte) |
@@ -123,21 +132,26 @@ SECTIONS | ||
123 | 132 | /* We want the small data sections together, so single-instruction offsets |
124 | 133 | can access them all, and initialized data all before uninitialized, so |
125 | 134 | we can shorten the on-disk segment size. */ |
126 | - .sdata ${SDATA_START_ADDR} : { | |
135 | + | |
136 | + .sdata ${SDATA_START_ADDR} : | |
137 | + { | |
127 | 138 | ${RELOCATING+PROVIDE (__gp = . + 0x8000);} |
128 | 139 | *(.sdata) |
129 | 140 | } |
130 | 141 | |
131 | 142 | /* See comment about .rozdata. */ |
132 | - .rosdata ${ROSDATA_START_ADDR} : { | |
143 | + .rosdata ${ROSDATA_START_ADDR} : | |
144 | + { | |
133 | 145 | *(.rosdata) |
134 | 146 | } |
135 | 147 | |
136 | 148 | /* We place the .sbss data section AFTER the .rosdata section, so that |
137 | 149 | it can directly preceed the .bss section. This allows runtime startup |
138 | 150 | 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 | + { | |
141 | 155 | ${RELOCATING+__sbss_start = .;} |
142 | 156 | *(.sbss) |
143 | 157 | *(.scommon) |
@@ -184,7 +198,7 @@ SECTIONS | ||
184 | 198 | .debug_pubnames 0 : { *(.debug_pubnames) } |
185 | 199 | |
186 | 200 | /* DWARF 2 */ |
187 | - .debug_info 0 : { *(.debug_info) } | |
201 | + .debug_info 0 : { *(.debug_info) *(.gnu.linkonce.wi.*) } | |
188 | 202 | .debug_abbrev 0 : { *(.debug_abbrev) } |
189 | 203 | .debug_line 0 : { *(.debug_line) } |
190 | 204 | .debug_frame 0 : { *(.debug_frame) } |
@@ -192,17 +206,17 @@ SECTIONS | ||
192 | 206 | .debug_loc 0 : { *(.debug_loc) } |
193 | 207 | .debug_macinfo 0 : { *(.debug_macinfo) } |
194 | 208 | |
195 | - /* SGI/MIPS DWARF 2 extensions */ | |
209 | + /* SGI/MIPS DWARF 2 extensions. */ | |
196 | 210 | .debug_weaknames 0 : { *(.debug_weaknames) } |
197 | 211 | .debug_funcnames 0 : { *(.debug_funcnames) } |
198 | 212 | .debug_typenames 0 : { *(.debug_typenames) } |
199 | 213 | .debug_varnames 0 : { *(.debug_varnames) } |
200 | 214 | |
201 | - /* User stack */ | |
202 | - .stack 0x200000 : { | |
215 | + /* User stack. */ | |
216 | + .stack 0x200000 : | |
217 | + { | |
203 | 218 | ${RELOCATING+__stack = .;} |
204 | 219 | *(.stack) |
205 | 220 | } |
206 | - /* These must appear regardless of . */ | |
207 | 221 | } |
208 | 222 | EOF |
@@ -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 | + | |
1 | 11 | cat <<EOF |
2 | 12 | OUTPUT_FORMAT("${OUTPUT_FORMAT}") |
3 | 13 | OUTPUT_ARCH(${ARCH}) |
4 | 14 | |
5 | -MEMORY { | |
15 | +MEMORY | |
16 | +{ | |
6 | 17 | ram : o = 0x1000, l = 512k |
7 | - } | |
18 | +} | |
8 | 19 | |
9 | 20 | SECTIONS |
10 | 21 | { |
@@ -12,44 +23,40 @@ SECTIONS | ||
12 | 23 | { |
13 | 24 | *(.text) |
14 | 25 | *(.strings) |
15 | - ${RELOCATING+ _etext = . ; } | |
26 | + ${RELOCATING+ _etext = . ; } | |
16 | 27 | } ${RELOCATING+ > ram} |
17 | 28 | |
18 | - | |
19 | -.tors : { | |
20 | - ___ctors = . ; | |
21 | - *(.ctors) | |
22 | - ___ctors_end = . ; | |
23 | - ___dtors = . ; | |
24 | - *(.dtors) | |
25 | - ___dtors_end = . ; | |
26 | -} ${RELOCATING+ > ram} | |
29 | + ${CONSTRUCTING+${TORS}} | |
27 | 30 | |
28 | 31 | .data : |
29 | 32 | { |
30 | - *(.data) | |
31 | - ${RELOCATING+ _edata = . ; } | |
33 | + *(.data) | |
34 | + ${RELOCATING+ _edata = . ; } | |
32 | 35 | } ${RELOCATING+ > ram} |
36 | + | |
33 | 37 | .bss : |
34 | 38 | { |
35 | - ${RELOCATING+ _bss_start = . ; } | |
36 | - *(.bss) | |
37 | - *(COMMON) | |
38 | - ${RELOCATING+ _end = . ; } | |
39 | + ${RELOCATING+ _bss_start = . ; } | |
40 | + *(.bss) | |
41 | + *(COMMON) | |
42 | + ${RELOCATING+ _end = . ; } | |
39 | 43 | } ${RELOCATING+ >ram} |
40 | -.stack ${RELOCATING+ 0x30000 } : | |
44 | + | |
45 | +.stack ${RELOCATING+ 0x30000 } : | |
41 | 46 | { |
42 | - ${RELOCATING+ _stack = . ; } | |
43 | - *(.stack) | |
47 | + ${RELOCATING+ _stack = . ; } | |
48 | + *(.stack) | |
44 | 49 | } ${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 | + } | |
53 | 60 | } |
54 | 61 | EOF |
55 | 62 |
@@ -5,7 +5,8 @@ ENTRY(_start) | ||
5 | 5 | |
6 | 6 | SECTIONS |
7 | 7 | { |
8 | -.text ${BIG+ ${RELOCATING+ 0x0000000}} : { | |
8 | +.text ${BIG+ ${RELOCATING+ 0x0000000}} : | |
9 | + { | |
9 | 10 | *(.text) |
10 | 11 | *(.strings) |
11 | 12 | *(.rdata) |
@@ -13,38 +14,40 @@ SECTIONS | ||
13 | 14 | |
14 | 15 | .ctors ${BIG+ ${RELOCATING+ 0x2000000}} : |
15 | 16 | { |
16 | - ${RELOCATING+ ___ctors = . ; } | |
17 | + ${CONSTRUCTING+ ___ctors = . ; } | |
17 | 18 | *(.ctors); |
18 | - ${RELOCATING+ ___ctors_end = . ; } | |
19 | + ${CONSTRUCTING+ ___ctors_end = . ; } | |
19 | 20 | ___dtors = . ; |
20 | 21 | *(.dtors); |
21 | - ${RELOCATING+ ___dtors_end = . ; } | |
22 | + ${CONSTRUCTING+ ___dtors_end = . ; } | |
22 | 23 | } |
23 | 24 | |
24 | -.data ${BIG+ ${RELOCATING+ 0x3000000}} : { | |
25 | - *(.data) | |
25 | +.data ${BIG+ ${RELOCATING+ 0x3000000}} : | |
26 | + { | |
27 | + *(.data) | |
26 | 28 | } |
27 | 29 | |
28 | 30 | .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 = . ; } | |
40 | 43 | } |
41 | 44 | |
42 | 45 | .stack ${RELOCATING+ 0xf000 } : |
43 | 46 | { |
44 | - ${RELOCATING+ _stack = . ; } | |
45 | - *(.stack) | |
46 | - ${RELOCATING+ __stack_top = . ; } | |
47 | - } | |
47 | + ${RELOCATING+ _stack = . ; } | |
48 | + *(.stack) | |
49 | + ${RELOCATING+ __stack_top = . ; } | |
50 | + } | |
48 | 51 | |
49 | 52 | } |
50 | 53 | EOF |