From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (qmail 24784 invoked from network); 6 Aug 1998 16:36:34 -0000 Received: from relay6.uu.net (192.48.96.16) by mail2.redhat.com with SMTP; 6 Aug 1998 16:36:34 -0000 Received: from uucp1.uu.net by relay6.UU.NET with SMTP (peer crosschecked as: uucp1.uu.net [192.48.96.81]) id QQfbha15577; Thu, 6 Aug 1998 12:36:29 -0400 (EDT) Received: from applix.UUCP by uucp1.uu.net with UUCP/RMAIL ; Thu, 6 Aug 1998 12:36:29 -0400 Received: from tuxedo by applix.com (4.1/SMI-4.1.3JJM) id AA08262; Thu, 6 Aug 98 12:30:41 EDT Received: (from ericding@localhost) by tuxedo (8.8.7/8.8.7) id MAA00340; Thu, 6 Aug 1998 12:30:36 -0400 To: axp-list@redhat.com Subject: Re: BUG: probs with resolving functions in shared library References: <199808052248.AAA01063@stefan.sime.com> <199808061259.OAA00370@stefan.sime.com> From: Eric Ding Date: 06 Aug 1998 12:30:36 -0400 In-Reply-To: Quant-X Alpha Linux Support's message of Thu, 6 Aug 1998 14:59:42 +0200 Message-Id: X-Mailer: Gnus v5.5/Emacs 20.2 Hi Stefan, thanks for your suggestions -- I'm not altogether sure they'll even be possible in the real application, but let's stay with the stub for now; it still appears that the fix only works partially. We use the -export-dynamic flag because the shared library funcs do occasionally need to access functions in the main executable. Using the method you detail below, I get a core dump when I try to access a function in my "libmain.so" library from the libtest2.so library. So while this solution helps work around the scoping bug, it doesn't completely do for our problem... any other ideas? Eric Quant-X Alpha Linux Support writes: > I think the problem is in your head. ;-} > The solution is easy (correct me if not...). > You only must make shure that the main program does **not** need > -export-dynamic. That's really easy (at least here, maybe not for > you...) > a) make the main-program a shared library (this step needs (here) no code > changes, only affects linking stage). > b) use a stub (linked without -export-dynamic) to start the main program > (library).