Date: Mon, 18 Sep 2000 14:04:49 -0700 (PDT) From: John Polstra <jdp@polstra.com> To: hackers@freebsd.org Cc: fjoe@iclub.nsu.ru Subject: Re: Trouble with dynamic loading of C++ libs in PHP v4.02 on FreeBSD 4.1 Message-ID: <200009182104.OAA15154@vashon.polstra.com> In-Reply-To: <Pine.BSF.4.21.0009181204060.4653-100000@iclub.nsu.ru> References: <Pine.BSF.4.21.0009181204060.4653-100000@iclub.nsu.ru>
next in thread | previous in thread | raw e-mail | index | archive | help
In article <Pine.BSF.4.21.0009181204060.4653-100000@iclub.nsu.ru>, Max Khon <fjoe@iclub.nsu.ru> wrote: > hi, there! > > On Fri, 15 Sep 2000, John Polstra wrote: > > > Here is another possibility: we could call _thread_init() from > > crt1.o. The patch (untested) is below. It calls _thread_init() if > > and only if that symbol is defined -- i.e., libc_r is linked in. > > What do you think about this solution? > > seems ok to me but can we do this from `do_ctors' or `_init' -- they are > located in common/ That's a good point. But I would rather not do it from crtbegin since there is a good chance that we'll eventually be using the GCC version of that. However, I have some plans to unify the versions of crt1.c so that it can be moved into "common". The alpha and sparc versions are identical, and they are not very much different from the i386 version. I think a couple of platform-specific #defines or inline functions could handle all of the architecture dependencies. Note, I _don't_ want to do it using "#ifdef __i386__", etc., because that doesn't scale well for a lot of platforms and it makes the code hard to read. Instead I would prefer to #include a small platform-specific header file which defines macros and inline functions appropriately. John -- John Polstra jdp@polstra.com John D. Polstra & Co., Inc. Seattle, Washington USA "Disappointment is a good sign of basic intelligence." -- Chögyam Trungpa 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?200009182104.OAA15154>