Add new module ld-version-script. Fix doc for visibility.
[pspp] / doc / visibility.texi
index 285236100d172e91bc9e4e1fc1863e9cbc6ec181..2fbcbf517d789c1112ee26faccba6d47af85a498 100644 (file)
@@ -1,16 +1,19 @@
+@node visibility
+@section visibility
+
 @c Documentation of gnulib module 'visibility'.
 
-@c Copyright (C) 2005 Free Software Foundation, Inc.
+@c 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.2 or
+@c under the terms of the GNU Free Documentation License, Version 1.3 or
 @c any later version published by the Free Software Foundation; with no
 @c Invariant Sections, with no Front-Cover Texts, and with no Back-Cover
 @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
@@ -41,8 +44,8 @@ with the same name in the executable or in a shared library interposed
 with @code{LD_PRELOAD}.) Whereas a call to a function for which the compiler
 can assume that it is in the same shared library is just a direct "call"
 instructions. Similarly for variables: A reference to a global variable
-fetches a pointer in the so-called GOT (global offset table); this pointer
-to the variable's memory. So the code to access it is two memory
+fetches a pointer in the so-called GOT (global offset table); this is a
+pointer to the variable's memory. So the code to access it is two memory
 load instructions. Whereas for a variable which is known to reside in the
 same shared library, it is just a direct memory access: one memory load
 instruction.
@@ -81,6 +84,8 @@ This is perfect: It burdens the maintainer only for exported API, not
 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