Go to file
Gary V. Vaughan c823c708c8 Without this patch, lt_dlopen always opens modules with symbol
visibility set according to the underlying implementation.
Here, we add lt_dlopenadvise() to allow callers to request,
among other things, local or global symbol visibility from the
underlying dlloader:

* libltdl/ltdl.c (LT_DLRESIDENT_FLAG): Removed.
(LT_DLIS_RESIDENT): Use public is_resident info field.
(LT_DLIS_SYMLOCAL, LT_DLIS_SYMGLOBAL): New macros to test for
module symbol visibility status.
(tryall_dlopen): If vtable->module_open() was able to act on
either is_symlocal or is_symglobal hints, store that in
the handle flags.
(lt_dlopenadvise): New function that works like lt_dlopen(),
but accepts an advise type to determine whether to ask
dlloaders to change default symbol visibility.
(lt_dlopen, lt_dlopenext): Just call lt_dlopenadvise() with
the correct parameters.
(lt_dladvise_init, lt_dladvise_destroy): New functions to
initialize and destroy an advise type hint.
(lt_dladvise_ext, lt_dladvise_resident, lt_dladvise_local)
(lt_dladvise_global): Set hints on an advise type.
(openadvise): Factored out of lt_dlopenadvise.
(has_library_ext): Factored out of lt_dlopenadvise.
* libltdl/ltdl.h: Declare all of the above.
(lt_dlinfo): New fields for advise hints.
* libltdl/libltdl/lt_dlloader.h (lt_module_open): Add a new
advise parameter.  Adjust all callers.
(lt_dladvise): New opaque type for advise hints.
* libltdl/libltdl/lt__private.h (lt__advise): Declare
contents of opaque lt_dladvise type.
* libltdl/libltdl/lt_error.h (CONFLICTING_FLAGS): New error
for attempts to have local and global symbol visibility at the
same time.
* libltdl/loaders/dld_link.c, libltdl/loaders/dyld.c,
libltdl/loaders/load_add_on.c, libltdl/loaders/loadlibrary.c,
libltdl/loaders/preopen.c, libltdl/loaders/shl_load.c: Adjust.
* libltdl/loaders/dlopen.c (RTLD_LOCAL, RTLD_GLOBAL): Try to
define these symbols if the system has equivalents.
(vmopen): If unable to act on a caller request to set symbol
visibility, then unset the relevant hints in the advise type.
* tests/lt_dladvise.at: New tests for the above.
* doc/libtool.texi (Libltdl Interface): Updated.
* NEWS: Updated.
2007-05-08 14:38:50 +00:00
doc Without this patch, lt_dlopen always opens modules with symbol 2007-05-08 14:38:50 +00:00
libltdl Without this patch, lt_dlopen always opens modules with symbol 2007-05-08 14:38:50 +00:00
mail Roll back copyright changes. 2004-01-04 20:45:24 +00:00
tests * libltdl/config/ltmain.m4sh (func_mode_link): When adding 2007-05-03 18:07:28 +00:00
.cvsignore * .cvsignore, doc/.cvsignore, libltdl/.cvsignore, 2006-06-13 18:36:56 +00:00
AUTHORS * AUTHORS, HACKING: Updated. 2005-08-08 06:47:42 +00:00
bootstrap * HACKING (Licensing Rules): Explain the various license texts 2007-03-25 12:12:44 +00:00
ChangeLog Without this patch, lt_dlopen always opens modules with symbol 2007-05-08 14:38:50 +00:00
ChangeLog.1996 * ChangeLog, ChangeLog.0, ChangeLog.1: Refactored... 2003-10-21 13:32:53 +00:00
ChangeLog.1997 * ChangeLog, ChangeLog.0, ChangeLog.1: Refactored... 2003-10-21 13:32:53 +00:00
ChangeLog.1998 * doc/libtool.texi: Typo fixes. 2007-01-21 14:34:01 +00:00
ChangeLog.1999 * doc/libtool.texi: Typo fixes. 2007-01-21 14:34:01 +00:00
ChangeLog.2000 * ChangeLog, ChangeLog.0, ChangeLog.1: Refactored... 2003-10-21 13:32:53 +00:00
ChangeLog.2001 * doc/libtool.texi: Typo fixes. 2007-01-21 14:34:01 +00:00
ChangeLog.2002 * ChangeLog, ChangeLog.0, ChangeLog.1: Refactored... 2003-10-21 13:32:53 +00:00
ChangeLog.2003 * ChangeLog.2003: New file, containing all the ChangeLog entries 2004-01-06 19:43:09 +00:00
ChangeLog.2004 * doc/libtool.texi: Typo fixes. 2007-01-21 14:34:01 +00:00
ChangeLog.2005 * README, README.alpha: Adjust copyright years. 2006-01-03 13:51:13 +00:00
ChangeLog.2006 * Makefile.am (EXTRA_DIST): Add ChangeLog.2006. 2007-01-21 14:42:58 +00:00
clcommit.m4sh * HACKING (Licensing Rules): Explain the various license texts 2007-03-25 12:12:44 +00:00
configure.ac The stamp-vcl file rules caused non-gnu make programs to rerun 2007-03-26 20:18:43 +00:00
HACKING * HACKING (Abstraction layers in libltdl): Rewritten somewhat 2007-03-28 16:52:26 +00:00
libtoolize.m4sh * HACKING (Licensing Rules): Explain the various license texts 2007-03-25 12:12:44 +00:00
ltmain.c * HACKING, Makefile.am, Makefile.maint, bootstrap, 2007-02-26 07:44:25 +00:00
Makefile.am Without this patch, lt_dlopen always opens modules with symbol 2007-05-08 14:38:50 +00:00
Makefile.maint * HACKING (Licensing Rules): Explain the various license texts 2007-03-25 12:12:44 +00:00
NEWS Without this patch, lt_dlopen always opens modules with symbol 2007-05-08 14:38:50 +00:00
PORTING * PORTING: removed the text Akim Demaille converted to .texi 1998-12-09 12:37:37 +00:00
README * README, README.alpha: Document how to test an arbitrary 2007-04-25 21:02:57 +00:00
README.alpha * README, README.alpha: Document how to test an arbitrary 2007-04-25 21:02:57 +00:00
THANKS * libltdl/config/ltmain.m4sh (func_mode_link): When adding 2007-05-03 18:07:28 +00:00
TODO * HACKING (Licensing Rules): Explain the various license texts 2007-03-25 12:12:44 +00:00

GNU Libtool
***********

1. Introduction
===============

This is GNU Libtool, a generic library support script.  Libtool hides
the complexity of using shared libraries behind a consistent, portable
interface.

To use Libtool, add the new generic library building commands to your
Makefile, Makefile.in, or Makefile.am.  See the documentation for
details.

Libtool's home page is:

  http://www.gnu.org/software/libtool/libtool.html

See the file NEWS for a description of recent changes to Libtool.

See the file INSTALL for generic instructions on how to build and install
Libtool.  Please see the file doc/notes.txt for some platform-specific
information.  Please note that you need GNU make to build Libtool.

See the info node (libtool)Tested Platforms. (or the file
doc/PLATFORMS) for a list of platforms that Libtool supports.


2. Reporting Bugs
=================

If you have any suggestions or bug reports, or you wish to port Libtool
to a new platform, please send electronic mail to the libtool mailing
list <libtool@gnu.org> or bug reports to <bug-libtool@gnu.org>.  Be sure
to send us your information from the end of the help message given by
`./libtool --help'.


3. The Test Suites
==================

Libtool comes with two integrated sets of tests to check that your build
is sane.  You can run both test suites like this, assuming that `gmake'
refers to GNU make:

  gmake -k check

If you want to run the old testsuite only, do it like this:

  gmake check TESTSUITEFLAGS=-V

If you want to run the new testsuite only, do it like this:

  gmake check-local

The tests of the old test suite run in groups in the various demo
subdirectories, so if one of the tests early in a group FAILs, the rest
of the tests in that group will be SKIPped.  If you see a FAIL further
into a group, even if a test with the same name PASSes in another test
group, you need to take note of the name of the first test in the group
if you want to rerun the group with FAILures to get verbose output.

To run a test group of the old test suite in isolation (say, you think
you have fixed a bug, but don't want to rerun the entire suite), you can
do it like this:

  gmake check TESTS="tests/cdemo-static.test tests/cdemo-make.test \
                     tests/cdemo-exec.test" \
              TESTSUITEFLAGS=-V

Providing that you have a FAIL from the most recent group from a
particular demo directory (like the cdemo-static.test group above), you
can explore the state of the directory to help with debugging.

If you wish to report a test group failure to the libtool list, you need
to send the verbose output of the FAILing group, along with the
information from the end of `$(top_builddir)/libtool --help' to the bug
report mailing list, <bug-libtool@gnu.org> with a subject line that
includes the string `[TEST FAILURE]'.  From a Bourne compatible shell,
you can generate verbose test output like this:

  VERBOSE=yes gmake check \
  TESTS="tests/cdemo-static.test tests/cdemo-make.test tests/cdemo-exec.test" \
  TESTSUITEFLAGS=-V | tee cdemo-static-group.log

In order to enable debug shell tracing, use VERBOSE=debug instead of
VERBOSE=yes.


In the long run, Libtool will move to using only the new,
Autotest-driven testsuite.  Its usage is documented in

  info Autoconf 'testsuite Invocation'

but simple help may also be obtained through

  gmake check-local TESTSUITEFLAGS='--help'

For verbose output, add the flag `-v', for running only a subset of the
independent tests, merely specify them by number or by keyword, both of
which are displayed with the `--list' flag.  For example, the `libtool'
keyword is used for the tests that exercise only this script.  So it is
possible to test an installed script, possibly from a different Libtool
release, with
  gmake check-local TESTSUITEFLAGS="-k libtool LIBTOOL=/path/to/libtool"

If you wish to report test failures to the libtool list, you need to
send the file `tests/testsuite.log' to the bug report mailing list,
<bug-libtool@gnu.org>.

4. Version Numbering
====================

People have complained that they find the version numbering scheme under
which libtool is released confusing... so we've changed it!

It works like this:

	<major-number>.<minor-number>

Releases with a <major-number> less than 1 were not yet feature
complete.  Releases with a <major-number> of 1 used the old numbering
scheme that everyone disliked so much.  Releases with a <major-number>
of 2 us the new scheme described here.  If libtool ever undergoes a
major rewrite or substantial restructuring, the <major-number> will be
incremented again.

If we make a patch release to fix bugs in a stable release, we use a
third number, so:

      <major-number>.<minor-number>.<micro-number>

Version numbers are chosen to make it easy for users to decide two
things:

  Q: How `developed' is this release?
  A: The higher the number, the better!
  Q: How `stable' is this release?
  A: - If the <minor-number> is even, it is a stable release, `2.0'.
     - If the <minor-number> is odd, it is a development version with
       new features compared to the last stable release, `2.1a'.
     - If it has an `odd'[1] letter after the version number,  it is a
       snapshot direct from CVS, `2.1a'.
     - If it has an `even'[1] letter after the version number, it is an
       alpha quality release, `2.1b'.
     - If it has three numbers in the version, it is a patch release,
       fixing bugs from the stable release (with no new features), `2.0.1'.

[1] We always increment the letter in the repository before *and* after
    making a release tarball.  This means that "odd" letters
    (a,c,e,g...) only exist in the repository, and "even" letters are
    used instantaneously for an alpha release.  Since the odd lettered
    version numbers cover many states of the tree, we also qualify them
    by adding the cvs version of the ChangeLog:

    $ libtool --version
    ltmain.sh (GNU libtool 1.1603 2004/09/12 22:02:07) 2.1a

    Copyright (C) 2004  Free Software Foundation, Inc.
    This is free software; see the source for copying conditions.  There is NO
    warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

For more details about version numbers, see:

    http://www.gnu.org/software/libtool/contribute.html

-- 
  Copyright (C) 2004, 2005 Free Software Foundation, Inc.
  Written by Gary V. Vaughan, 2004

  This file is part of GNU Libtool.

GNU Libtool is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License as
published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.

GNU Libtool is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with GNU Libtool; see the file COPYING.  If not, a copy
can be downloaded from http://www.gnu.org/licenses/gpl.html, or
obtained by writing to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA


Local Variables:
mode: text
fill-column: 72
End:
vim:tw=72