[Top][All Lists]

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

Problem with exporting local symbols

From: Ralf Hoffmann
Subject: Problem with exporting local symbols
Date: Fri, 10 Jun 2005 14:02:01 +0200
User-agent: Mozilla Thunderbird 1.0.2 (X11/20050317)


I have a problem about symbol collisions in shared librarys. I currently
porting the build process of a shared library to libtool and the build
itself works so far.
The library uses a modified zlib implementation so the final library
contains zlib symbols. In the old build process the linker was called
with -version-script option using a script marking some symbols global
and all other (include the zlib symbols) local.

Since libtool doesn't offer this option I used the option
-export-symbol-regex so only the global symbols are exported at all.
But the result doesn't work correctly. Obviously the other symbols are
not defined local but are removed from the symbol table. However, the
dynamic loader messes up these symbols when an application is linked
with this library and the system wide zlib library.

Only explicitly defining the symbols local prevents the linker from
choosing the wrong symbols but it looks like the linker option
"-version-script" only exists in GNU ld and solaris ld so this is not
very portable.

Do you know of any other solution than renaming all symbols of the own
zlib verion?

Best Regards,

Ralf Hoffmann

E-Mail: Ralf Hoffmann <address@hidden>
  english or german

reply via email to

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