[C++-sig] Loading Boost.Python made bindings is horribly slow?

Rene Rivera grafik.list at redshift-software.com
Sat Apr 3 01:17:59 CEST 2004


Niall Douglas wrote:
> On 2 Apr 2004 at 14:06, Jonathan Brandmeyer wrote:
>>
>>Now, the only function that is exported is extern "C" initcvisual()
>>and the resulting cvisual.so file size is very significantly reduced.
>>(from about 3MB to 1.5 MB for me).  You have to add the option
>>-Wl,--version-script=$(MAPFILE_NAME) to the link command when invoking
>>the linker via G++ to make use of this file.
> 
> 
> Useful trick this - thanks for pointing it out.
> If I get some time this week, I may give a bash at patching GCC. Then 
> we can simply reuse the macros defining Windows DLL support to do the 
> same on POSIX.

I explain how I do the equivalent of dllexport on Linux+GCC on this message...

http://sourceforge.net/mailarchive/forum.php?thread_id=2793609&forum_id=34093

Doesn't require changing GCC, but is ELF only, and requires recent enough 
binutils. One adds something like such.., to each method to export:

__attribute__ ((section (".text.dll")))




-- 
-- Grafik - Don't Assume Anything
-- Redshift Software, Inc. - http://redshift-software.com
-- rrivera/acm.org - grafik/redshift-software.com - 102708583/icq




More information about the Cplusplus-sig mailing list