Date: Fri, 17 Aug 2001 15:51:43 -0700 (PDT) From: "David E. O'Brien" <obrien@FreeBSD.org> To: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: cvs commit: src/contrib/gcc/config/alpha crtbegin.asm Message-ID: <200108172251.f7HMphi43435@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
obrien 2001/08/17 15:51:43 PDT Modified files: (Branch: RELENG_4) contrib/gcc/config/alpha crtbegin.asm Log: Re-initialize gp after a jsr. When rtld runs the .fini section in a shared lib (C++), the code in question from .../contrib/gdb/config/alpha/crtbegin.asm first calls __do_globals_dtors_aux and then __do_frame_takedown. Unfortunately, the value of gp after a jsr is undefined and in this case had changed from before the call, probably as a result of calling code in some other shared library. The normal calling convention for alpha is to re-initialize gp using 'ldgp gp,0(ra)' after a jsr instruction but in this case no such re-initialization is done. This leads to a bogus value being read for the address of __do_frame_takedown and a quick segfault. Submitted by: dfr Approved by: re Obtained from: GCC 3.0 Revision Changes Path 1.1.1.2.2.1 +1 -0 src/contrib/gcc/config/alpha/crtbegin.asm To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200108172251.f7HMphi43435>