1
diff -ur gcc-2.95.3.old/gcc/config/alpha/crtbegin.asm gcc-2.95.3/gcc/config/alpha/crtbegin.asm
2
--- gcc-2.95.3.old/gcc/config/alpha/crtbegin.asm 2004-02-02 12:13:24.000000000 +0000
3
+++ gcc-2.95.3/gcc/config/alpha/crtbegin.asm 2004-02-02 12:16:37.000000000 +0000
5
- # Copyright (C) 1996, 1998 Free Software Foundation, Inc.
6
- # Contributed by Richard Henderson (rth@tamu.edu)
8
- # This file is free software; you can redistribute it and/or modify it
9
- # under the terms of the GNU General Public License as published by the
10
- # Free Software Foundation; either version 2, or (at your option) any
13
- # In addition to the permissions in the GNU General Public License, the
14
- # Free Software Foundation gives you unlimited permission to link the
15
- # compiled version of this file with other programs, and to distribute
16
- # those programs without any restriction coming from the use of this
17
- # file. (The General Public License restrictions do apply in other
18
- # respects; for example, they cover modification of the file, and
19
- # distribution when not linked into another program.)
21
- # This file is distributed in the hope that it will be useful, but
22
- # WITHOUT ANY WARRANTY; without even the implied warranty of
23
- # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
24
- # General Public License for more details.
26
- # You should have received a copy of the GNU General Public License
27
- # along with this program; see the file COPYING. If not, write to
28
- # the Free Software Foundation, 59 Temple Place - Suite 330,
29
- # Boston, MA 02111-1307, USA.
31
- # As a special exception, if you link this library with files
32
- # compiled with GCC to produce an executable, this does not cause
33
- # the resulting executable to be covered by the GNU General Public License.
34
- # This exception does not however invalidate any other reasons why
35
- # the executable file might be covered by the GNU General Public License.
38
- # Heads of the constructor/destructor lists.
41
- # The __*TOR_LIST__ symbols are not global because when this file is used
42
- # in a shared library, we do not want the symbol to fall over to the
43
- # application's lists.
44
+/* Copyright (C) 1996, 1998 Free Software Foundation, Inc.
45
+ * Contributed by Richard Henderson (rth@tamu.edu)
47
+ * This file is free software; you can redistribute it and/or modify it
48
+ * under the terms of the GNU General Public License as published by the
49
+ * Free Software Foundation; either version 2, or (at your option) any
52
+ * In addition to the permissions in the GNU General Public License, the
53
+ * Free Software Foundation gives you unlimited permission to link the
54
+ * compiled version of this file with other programs, and to distribute
55
+ * those programs without any restriction coming from the use of this
56
+ * file. (The General Public License restrictions do apply in other
57
+ * respects; for example, they cover modification of the file, and
58
+ * distribution when not linked into another program.)
60
+ * This file is distributed in the hope that it will be useful, but
61
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
62
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
63
+ * General Public License for more details.
65
+ * You should have received a copy of the GNU General Public License
66
+ * along with this program; see the file COPYING. If not, write to
67
+ * the Free Software Foundation, 59 Temple Place - Suite 330,
68
+ * Boston, MA 02111-1307, USA.
70
+ * As a special exception, if you link this library with files
71
+ * compiled with GCC to produce an executable, this does not cause
72
+ * the resulting executable to be covered by the GNU General Public License.
73
+ * This exception does not however invalidate any other reasons why
74
+ * the executable file might be covered by the GNU General Public License.
77
+#include "auto-host.h"
80
+ * Heads of the constructor/destructor lists.
83
+/* The __*TOR_LIST__ symbols are not global because when this file is used
84
+ * in a shared library, we do not want the symbol to fall over to the
85
+ * application's lists.
91
.section .eh_frame,"aw"
95
- # Fragment of the ELF _fini routine that invokes our dtor cleanup.
98
+ * Fragment of the ELF _fini routine that invokes our dtor cleanup.
103
- # Since the bits of the _fini function are spread across many
104
- # object files, each potentially with its own GP, we must
105
- # assume we need to load ours. Further, our .fini section
106
- # can easily be more than 4MB away from our .text bits so we
108
+ /* Since the bits of the _fini function are spread across many
109
+ object files, each potentially with its own GP, we must
110
+ assume we need to load ours. Further, our .fini section
111
+ can easily be more than 4MB away from our .text bits so we
116
jsr $26,__do_global_dtors_aux
118
- # Ideally this call would go in crtend.o, except that we can't
119
- # get hold of __EH_FRAME_BEGIN__ there.
120
+ /* Ideally this call would go in crtend.o, except that we can't
121
+ get hold of __EH_FRAME_BEGIN__ there */
123
jsr $26,__do_frame_takedown
125
- # Must match the alignment we got from crti.o else we get
126
- # zero-filled holes in our _fini function and then SIGILL.
127
+ /* Must match the alignment we got from crti.o else we get
128
+ zero-filled holes in our _fini function and then SIGILL. */
132
- # Fragment of the ELF _init routine that sets up the frame info.
135
+ * Fragment of the ELF _init routine that sets up the frame info.
141
jsr $26,__do_frame_setup
145
- # Invoke our destructors in order.
148
+ * Invoke our destructors in order.
153
- # Support recursive calls to exit.
154
+/* Support recursive calls to exit. */
155
$ptr: .quad __DTOR_LIST__
157
/* A globally unique widget for c++ local destructors to hang off.
158
@@ -128,17 +132,28 @@
159
.ent __do_global_dtors_aux
161
__do_global_dtors_aux:
172
+ /* Do c++ local destructors. */
173
+ lda $1,__cxa_finalize
175
+ lda $16,__dso_handle
176
+ jsr $26,__cxa_finalize
188
@@ -151,11 +166,11 @@
190
.end __do_global_dtors_aux
193
- # Install our frame info.
196
+ * Install our frame info.
199
- # ??? How can we rationally keep this size correct?
200
+/* ??? How can we rationally keep this size correct? */
203
.type $object,@object
206
.end __do_frame_setup
209
- # Remove our frame info.
212
+ * Remove our frame info.
216
.ent __do_frame_takedown
219
.weak __register_frame_info
220
.weak __deregister_frame_info
222
+.weak __cxa_finalize
224
diff -ur gcc-2.95.3.old/gcc/config/alpha/elf.h gcc-2.95.3/gcc/config/alpha/elf.h
225
--- gcc-2.95.3.old/gcc/config/alpha/elf.h 1999-06-21 21:15:10.000000000 +0100
226
+++ gcc-2.95.3/gcc/config/alpha/elf.h 2004-02-02 12:16:37.000000000 +0000
228
#define STARTFILE_SPEC \
230
%{pg:gcrt1.o%s} %{!pg:%{p:gcrt1.o%s} %{!p:crt1.o%s}}}\
231
- crti.o%s crtbegin.o%s"
232
+ crti.o%s %{shared:crtbeginS.o%s}%{!shared:crtbegin.o%s}"
234
/* Provide a ENDFILE_SPEC appropriate for ELF. Here we tack on the
235
magical crtend.o file which provides part of the support for
239
#define ENDFILE_SPEC \
240
- "crtend.o%s crtn.o%s"
241
+ "%{shared:crtendS.o%s}%{!shared:crtend.o%s} crtn.o%s"
243
/* We support #pragma. */
244
#define HANDLE_SYSV_PRAGMA
245
diff -ur gcc-2.95.3.old/gcc/config/alpha/t-crtbe gcc-2.95.3/gcc/config/alpha/t-crtbe
246
--- gcc-2.95.3.old/gcc/config/alpha/t-crtbe 1998-12-16 21:01:05.000000000 +0000
247
+++ gcc-2.95.3/gcc/config/alpha/t-crtbe 2004-02-02 12:16:37.000000000 +0000
250
# Assemble startup files.
251
crtbegin.o: $(srcdir)/config/alpha/crtbegin.asm $(GCC_PASSES)
252
- $(GCC_FOR_TARGET) -c -o crtbegin.o -x assembler $(srcdir)/config/alpha/crtbegin.asm
253
+ $(GCC_FOR_TARGET) -c -o crtbegin.o -x assembler-with-cpp -I. $(srcdir)/config/alpha/crtbegin.asm
255
crtend.o: $(srcdir)/config/alpha/crtend.asm $(GCC_PASSES)
256
$(GCC_FOR_TARGET) -c -o crtend.o -x assembler $(srcdir)/config/alpha/crtend.asm
258
+crtbeginS.o: $(srcdir)/config/alpha/crtbegin.asm $(GCC_PASSES)
259
+ $(GCC_FOR_TARGET) -DSHARED -c -o crtbeginS.o -x assembler-with-cpp -I. $(srcdir)/config/alpha/crtbegin.asm
261
+crtendS.o: $(srcdir)/config/alpha/crtend.asm $(GCC_PASSES)
262
+ $(GCC_FOR_TARGET) -c -o crtendS.o -x assembler -I. $(srcdir)/config/alpha/crtend.asm
263
diff -ur gcc-2.95.3.old/gcc/configure.in gcc-2.95.3/gcc/configure.in
264
--- gcc-2.95.3.old/gcc/configure.in 2004-02-02 12:13:24.000000000 +0000
265
+++ gcc-2.95.3/gcc/configure.in 2004-02-02 12:16:37.000000000 +0000
267
tm_file="${tm_file} alpha/elf.h alpha/linux.h alpha/linux-elf.h"
268
target_cpu_default="MASK_GAS"
269
tmake_file="t-linux t-linux-gnulibc1 alpha/t-linux alpha/t-crtbe alpha/t-ieee"
270
- extra_parts="crtbegin.o crtend.o"
271
+ extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o"
274
if test x$enable_threads = xyes; then
276
tm_file="${tm_file} alpha/elf.h alpha/linux.h alpha/linux-elf.h"
277
target_cpu_default="MASK_GAS"
278
tmake_file="t-linux alpha/t-linux alpha/t-crtbe alpha/t-ieee"
279
- extra_parts="crtbegin.o crtend.o"
280
+ extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o"
283
if test x$enable_threads = xyes; then
285
tm_file="${tm_file} alpha/elf.h alpha/netbsd.h alpha/netbsd-elf.h"
286
target_cpu_default="MASK_GAS"
287
tmake_file="alpha/t-crtbe alpha/t-ieee"
288
- extra_parts="crtbegin.o crtend.o"
289
+ extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o"
293
--- gcc-2.95.3.old/gcc/configure 2004-02-02 12:13:24.000000000 +0000
294
+++ gcc-2.95.3/gcc/configure 2004-02-02 14:20:41.000000000 +0000
295
@@ -3041,7 +3041,7 @@
296
tm_file="${tm_file} alpha/elf.h alpha/linux.h alpha/linux-elf.h"
297
target_cpu_default="MASK_GAS"
298
tmake_file="t-linux t-linux-gnulibc1 alpha/t-linux alpha/t-crtbe alpha/t-ieee"
299
- extra_parts="crtbegin.o crtend.o"
300
+ extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
303
if test x$enable_threads = xyes; then
304
@@ -3052,7 +3052,7 @@
305
tm_file="${tm_file} alpha/elf.h alpha/linux.h alpha/linux-elf.h"
306
target_cpu_default="MASK_GAS"
307
tmake_file="t-linux alpha/t-linux alpha/t-crtbe alpha/t-ieee"
308
- extra_parts="crtbegin.o crtend.o"
309
+ extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
312
if test x$enable_threads = xyes; then
313
@@ -3063,7 +3063,7 @@
314
tm_file="${tm_file} alpha/elf.h alpha/netbsd.h alpha/netbsd-elf.h"
315
target_cpu_default="MASK_GAS"
316
tmake_file="alpha/t-crtbe alpha/t-ieee"
317
- extra_parts="crtbegin.o crtend.o"
318
+ extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"