libtool-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: tests on AIX 5


From: Charles Wilson
Subject: Re: tests on AIX 5
Date: Wed, 17 Nov 2004 07:03:51 -0500
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040115 MultiZilla/1.6.2.0c

Daniel Reed wrote:
On 2004-11-16T10:15-0600, Bob Friesenhahn wrote:
) loaded.  If it did locate a symbol from the main exectable, then that
) indicates that symbols from the main executable may be polluting the
) namespace, which could lead to wrong behavior.

This is the case on at least Solaris, Linux, FreeBSD, and OS 10.

As of the summer of 2003, in Cygwin, symbols in the executable were not
available to dynamic libraries, but libraries had one symbol space (even if
they were not linked together, but linked against the executable or dlopened
by the executable). In order to get single-symbol-space behavior, the
executable can be linked as a dynamic library (with main() renamed to
main_stub()), and a stub executable could be linked against that library
(with main() just calling main_stub()).

This shouldn't be necessary any longer. This patch went in at some point (but I don't remember when):

http://sources.redhat.com/ml/binutils/2002-12/msg00334.html

The trick is, tho, when linking an application, there is no *auto-EXport* of symbols. You have to explicitly mark the symbols you want exported as declspec(dllexport) -- or use the --export-all flag.

(When linking a DLL, the "normal" procedure on modern cygwin is to NOT explicitly declspec() anything; when linking a dll under those conditions, auto-EXport kicks in...)

--
Chuck




reply via email to

[Prev in Thread] Current Thread [Next in Thread]