This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
fix ia64 shared library destructors
- To: gcc-patches at gcc dot gnu dot org
- Subject: fix ia64 shared library destructors
- From: Richard Henderson <rth at redhat dot com>
- Date: Tue, 21 Aug 2001 19:16:10 -0700
My recent change to use gp-relative data inserted a use of "gp"
in a place where it had been clobbered and not yet restored.
Which only fails when using shared libraries, and I'd tested
the original patch only with C, which by default doesn't use
any shared libraries out of the build tree. Oops.
Rather than mess up the rather nice schedule by coercing the
value back into the gp register, I'll just use the saved value.
Tested on libstdc++.so this time. ;-)
r~
* config/ia64/crtbegin.asm (__do_global_dtors_aux): Use saved
copy of gp while the real gp register contains garbage.
Index: config/ia64/crtbegin.asm
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/ia64/crtbegin.asm,v
retrieving revision 1.11
diff -c -p -d -u -r1.11 crtbegin.asm
--- crtbegin.asm 2001/08/19 04:46:25 1.11
+++ crtbegin.asm 2001/08/22 02:09:48
@@ -172,7 +172,7 @@ __do_global_dtors_aux:
{ .mmi
ld8 r15 = [loc0]
;;
- add r16 = r15, gp
+ add r16 = r15, loc2
adds r15 = 8, r15
;;
}