Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 17 Jun 1998 20:42:16 +0000 (GMT)
From:      Terry Lambert <tlambert@primenet.com>
To:        mikko@dynas.se
Cc:        freebsd-hackers@FreeBSD.ORG
Subject:   Re: Problem with ld.so + LD_PRELOAD + _init()
Message-ID:  <199806172042.NAA27665@usr01.primenet.com>
In-Reply-To: <Pine.GSO.3.96.980617172736.26318G-100000@spirit.dynas.se> from "=?ISO-8859-1?Q?Mikko_Ty=F6l=E4j=E4rvi?=" at Jun 17, 98 05:30:47 pm

next in thread | previous in thread | raw e-mail | index | archive | help
> Fiddling around with LD_PRELOAD and wrapping of system calls, I
> discovered that the "_init()" function of the preloaded lib never gets
> called.
> 
> It is not entirely clear from the man-page that it should be,
> but on Solaris 2.[56], it is.  And it works for libraries linked with
> the program, as well as libraries loaded with dlopen().  Also, it
> sometimes makes life a lot easier...

It should be called.

If it is not called, pure virtual base class constructors won't be called
for C++ shared objects.


					Terry Lambert
					terry@lambert.org
---
Any opinions in this posting are my own and not those of my present
or previous employers.

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199806172042.NAA27665>