After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 135274 - underscore prefixed symbols exported on Linux
underscore prefixed symbols exported on Linux
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: .General
2.3.x
Other Linux
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2004-02-24 09:48 UTC by James Henstridge
Modified: 2011-02-04 16:16 UTC
See Also:
GNOME target: ---
GNOME version: 2.5/2.6


Attachments
export-dynamic.patch (1.14 KB, patch)
2004-02-24 09:50 UTC, James Henstridge
none Details | Review

Description James Henstridge 2004-02-24 09:48:41 UTC
This is a followup to the following gtk-devel-list thread:
  http://mail.gnome.org/archives/gtk-devel-list/2004-February/msg00127.html

I've filed it as a GTK bug, but it also affects ATK, Pango and Glib.

Currently, the restriction on export of underscore prefixed symbols is not
functioning correctly on Linux, even when libtool has a working
-export-symbols implementation (ie. 1.5.2 or older versions with the
expsym-linux patch).

This problem seems to be that the linker ignores the -version-script option
when it also sees --export-dynamic.  The flags output by "pkg-config --libs
gmodule-2.0" include -Wl,--export-dynamic so libtool will pass the flag
through without checking it.

Unless I am mistaken, there isn't any case where you would need to use
--export-dynamic when linking a shared library.  Its usual purpose is to
export the symbols from a normal executable.  Since this is done by default
for a shared library it shouldn't be needed, and in fact seems to be
harmful in this case.

The solution to the problem is to remove the flag from the link line.  I
posted a simplistic patch to gtk-devel-list to do this (will attach it to
this bug report shortly), but the eventual fix might be to remove the flag
from gmodule-2.0's libs list.
Comment 1 James Henstridge 2004-02-24 09:50:20 UTC
Created attachment 24715 [details] [review]
export-dynamic.patch
Comment 2 Owen Taylor 2004-02-24 22:46:32 UTC
Looks good to commit if you add a comment describing why
we are doing this.
Comment 3 Owen Taylor 2004-03-03 21:30:52 UTC
Committed the change, and also in Pango.

Wed Mar  3 16:00:10 2004  Owen Taylor  <otaylor@redhat.com>
 
        * configure.in: Strip out the "export-dynamic" libtool
        option from library link lines. (#124687, James Henstridge)