Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 17 Aug 2001 15:54:26 -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.295/config/alpha crtbegin.asm
Message-ID:  <200108172254.f7HMsQl43600@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
obrien      2001/08/17 15:54:26 PDT

  Modified files:
    contrib/gcc.295/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
  Obtained from:	GCC 3.0
  
  Revision  Changes    Path
  1.2       +89 -4     src/contrib/gcc.295/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?200108172254.f7HMsQl43600>