bug-gnulib
[Top][All Lists]
Advanced

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

Re: exported symbols of shared libraries


From: Bruno Haible
Subject: Re: exported symbols of shared libraries
Date: Mon, 2 Mar 2009 22:09:21 +0100
User-agent: KMail/1.9.9

Ralf Wildenhues wrote:
> How about suggesting libtool's -export-symbols as a more portable but
> less powerful alternative for systems that do not support GNU ld version
> scripts?

I'm applying this doc patch to mention -export-visibility in the gnulib doc.
But as you can see from this doc section, the use of the GCC "visibility"
attributes has less drawbacks.

Bruno


2009-03-02  Bruno Haible  <address@hidden>

        * doc/gnulib.texi (Exported Symbols of Shared Libraries): New section.
        * doc/visibility.texi: Mention libtool's -export-symbols option.

--- doc/gnulib.texi.orig        2009-03-02 22:01:17.000000000 +0100
+++ doc/gnulib.texi     2009-03-02 21:54:56.000000000 +0100
@@ -5821,6 +5821,7 @@
 * gcd::
 * Regular expressions::
 * Searching for Libraries::
+* Exported Symbols of Shared Libraries::
 * Supporting Relocation::
 * func::
 * warnings::
@@ -5909,6 +5910,10 @@
 
 @include havelib.texi
 
address@hidden Exported Symbols of Shared Libraries
address@hidden Controlling the Exported Symbols of Shared Libraries
address@hidden visibility.texi
+
 @include relocatable-maint.texi
 
 @include func.texi
--- doc/visibility.texi.orig    2009-03-02 22:01:17.000000000 +0100
+++ doc/visibility.texi 2009-03-02 22:00:26.000000000 +0100
@@ -1,6 +1,6 @@
 @c Documentation of gnulib module 'visibility'.
 
address@hidden Copyright (C) 2005, 2006 Free Software Foundation, Inc.
address@hidden Copyright (C) 2005-2006, 2009 Free Software Foundation, Inc.
 
 @c Permission is granted to copy, distribute and/or modify this document
 @c under the terms of the GNU Free Documentation License, Version 1.3 or
@@ -9,8 +9,8 @@
 @c Texts.  A copy of the license is included in the ``GNU Free
 @c Documentation License'' file as part of this distribution.
 
-This module allows precise control of the symbols exported by a shared
-library.  This is useful because
+The @code{visibility} module allows precise control of the symbols
+exported by a shared library.  This is useful because
 
 @itemize @bullet
 @item
@@ -81,6 +81,8 @@
 for library-internal API. And it keeps the annotations in the source code.
 @end itemize
 
+GNU libtool's @option{-export-symbols} option implements the first approach.
+
 This gnulib module implements the third approach. For this it relies on
 GNU GCC 4.0 or newer, namely on its @samp{-fvisibility=hidden} command-line
 option and the "visibility" attribute. (The "visibility" attribute




reply via email to

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