* gnulib: Update to the latest git version.
* gl-mod/bootstrap: Likewise.
* bootstrap: Regenerate.
* gl/top/README-release.diff: Update the patch for the latest
changes in gnulib's README-release.
* libltdl/ltdl.c, libltdl/loaders/dld_link.c,
libltdl/loaders/dlopen.c, libltdl/loaders/dyld.c,
libltdl/loaders/load_add_on.c, libltdl/loaders/loadlibrary.c,
libltdl/loaders/preopen.c, libltdl/loaders/shl_load.c: For at
least gcc 4.8.3 and 4.9.1, __attribute__((__unused)) should
follow the unused parameter declaration.
* NO-THANKS: Add Дилян Палаузов.
Reported by Дилян Палаузов
Signed-off-by: Gary V. Vaughan <gary@gnu.org>
* libltdl/loaders/dyld.c (vm_sym): Use strlcpy to pacify syntax
checks.
* libltdl/ltdl.c (try_dlopen): Likewise.
Signed-off-by: Gary V. Vaughan <gary@gnu.org>
See maintain.texi (Copyright Notices) for rules for maintaining
the years in copyright notices.
* All Files (Copyright): Updated with missing 2011 and 2012.
Signed-off-by: Gary V. Vaughan <gary@gnu.org>
* cfg.mk (local-checks-to-fix): Remove sc_space_tab from list of
disabled checks.
(exclude_file_name_regexp--sc_space_tab): Don't flag space-tab
sequences in diff files as an error.
* Makefile.am, build-aux/general.m4sh, build-aux/git-hooks/commit-msg,
build-aux/ltmain.m4sh, libltdl/loaders/dyld.c,
libltdl/loaders/shl_load.c, libltdl/ltdl.h, libltdl/ltdl.mk,
libltdl/slist.c, libtoolize.m4sh, m4/ltoptions.m4, tests/demo/dlmain.c,
tests/depdemo/main.c, tests/libtoolize.at, tests/lt_dladvise.at,
tests/pdemo/longer_file_name_dlmain.c, tests/sh.test, tests/static.at,
tests/stresstest.at, tests/template.at: Fix space-tab sequences by
reversing them in regexps, and deleting leading spaces in indentation.
Signed-off-by: Gary V. Vaughan <gary@gnu.org>
libltdl/loaders/dyld.c, libltdl/loaders/dlopen.c, libltdl/ltdl.c,
libltdl/lt_error.c, libltdl/lt_dlloader.c, libltdl/lt__dirent.c:
Include lt__private.h prior to any system headers.
* libltdl/lt__alloc.c: Remove redundant inclusion of configuration
header.
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.
* libltdl/lt__alloc.c, libltdl/lt_dlloader.c, libltdl/ltdl.c,
libltdl/slist.c, libltdl/libltdl/lt__alloc.h,
libltdl/libltdl/lt_error.h, libltdl/libltdl/slist.h,
libltdl/loaders/dld_link.c, libltdl/loaders/dlopen.c,
libltdl/loaders/dyld.c, libltdl/loaders/load_add_on.c,
libltdl/loaders/loadlibrary.c, libltdl/loaders/preopen.c,
libltdl/loaders/shl_load.c, tests/stresstest.at,
tests/testsuite.at, tests/f77demo/foo.h, tests/fcdemo/foo.h,
tests/mdemo/foo.h, tests/mdemo/foo1.c, tests/mdemo/foo2.c,
tests/mdemo/main.c: Allow sources to be compiled by a C++
compiler: Cast appropriately, add C linkage for `get_vtable'
functions, do not use C++ keyword `delete'.
`loaders' list management into a new SList ADT. In the process,
the API for writing loaders is a little cleaner, so all the
existing loaders were tweaked to take advantage of that:
* libltdl/slist.h, libltdl/slist.c: New files implementing a
generic singly linked list container ADT. The ADT is purely
internal, and none of its API's are visible from an installed
libltdl.
* libltdl/lt_dlloader.h (lt_dlloader): Removed next field again
:-) Renamed to lt_dlvtable for API. Changed all callers.
(lt_dlloader_get): New function to turn an lt_dlloader into its
associated lt_dlvtable.
(lt_dlloader_add): Removed unused data parameter. The caller
data belongs to (and is set by) the loader itself, not the
loader's client. Changed all callers.
(lt_dlloader_name, lt_dlloader_data): Removed. Use
lt_dlloader_get instead!
* libltdl/lt__private.h: Include slist.h.
(lt__alloc_die_callback): Add missing LT_SCOPE to declaration.
(lt_dlhandle_struct): Use lt_dlvtable instead of opaque
lt_dlloader.
* libltdl/ltdl.c (lt_dlexit): Rewritten for the new loader API.
(loaders, lt_dlloader_add, lt_dlloader_remove, lt_dlloader_next,
lt_dlloader_find): Moved from here...
* libltdl/lt_dlloader.c ((loaders, lt_dlloader_add,
lt_dlloader_remove, lt_dlloader_next, lt_dlloader_find): ...to
here. And rewritten in terms of new SList interface.
* libltdl/ltdl.c (lt_dlexit, tryall_dlopen): Rewritten in terms of
new lt_dlloader interface.
* libltdl/Makefile.am (libdlloader_la_SOURCES): Add slist.h and
slist.c. Move lt_dlloader.h from here...
(pkginclude_HEADERS): ...to here.
(libltdl_la_SOURCES): Add lt_dlloader.c and lt_dlloader.h.
* libltdl/lt_dlloader.h (lt_dlloader): Add next field.
* libltdl/ltdl.c (lt_user_dlloader): Remove entirely. Change all
callers to use lt_dlloader instead. Add a compatibility macro.
(lt_dlloader_add): Remove copy and allocate stage, just hook
directly into the loaders list.
operation of libtool (neither would work alone). First, there is
a new feature that allows libraries to preopen modules. This
entails a backwards incompatible change to the libltdl API for
separating out the preloaded symbol lists by owner. Second, in
the tradition of "eating our own dogfood", libltdl now preloads
its own dlloaders. The internal API for dlloaders has also had to
change in a backwards incompatible way in support of the new
library preloading feature. If you don't use preloaded libraries,
you needn't change your project sources, though you will need to
recompile against the new libltdl. The API changes are mostly
confined to dlloaders, so you probably needn't worry about those
(unless you have written a custom loader that you want libltdl to
use):
* configure.ac (AC_CONFIG_FILES): Add libltdl/loaders/Makefile.
* libltdl/configure.ac (AC_CONFIG_FILES): Add loaders/Makefile.
* libltdl/loaders: New directory for module loaders, to simplify
Makefile rules, and to give the loaders themselves names that are
unique in the first few characters.
* libtoolize.in (func_copy_all_files): Copy recursively to pick up
the loaders directory contents.
* libltdl/loaders/Makefile.am: New file. Move module building
rules to here...
* libltdl/Makefile.am: ...from here.
(VERSION_INFO): Bumped version info to signify interface changes.
(libltdl_la_CPPFLAGS, libltdlc_la_CPPFLAGS): Set LTDLOPEN
appropriately for each library.
* libltdl/loader-dld_link.c, libltdl/loader-dlopen.c,
libltdl/loader-dyld.c, libltdl/loader-load_add_on.c,
libltdl/loader-loadlibrary.c libltdl/loader-preopen.c,
libltdl/loader-shl_load.c: Moved from here...
* libltdl/loaders/dld_link.c, libltdl/loaders/dlopen.c,
libltdl/loaders/dyld.c, libltdl/loaders/load_add_on.c,
libltdl/loaders/loadlibrary.c libltdl/loaders/preopen.c,
libltdl/loaders/shl_load.c: ...to here.
(get_vtable): New entry function for each.
* libltdl/loaders/preopen.c (lt_dlsymlists_t): Replaced by...
(symlist_chain): ...a new structure which maps lists of preloaded
symbols from the object that loads them.
(lt_dlpreload_open): New function to automatically open all
preloaded modules belonging to a named object (ORIGINATOR).
* libltdl/lt__alloc.c (lt__zalloc): New function to return a block
of zeroed out new memory.
* libltdl/lt__alloc.h (lt__zalloc): Prototype it.
* libltdl/lt__private.h (lt__alloc_die_callback): Add missing
prototype.
(lt__error_strings): Make this opaque to callers.
* libltdl/lt_error.c (lt__error_strings): Move the implementation
to here.
* libltdl/lt_dlloader.h (lt_user_dlloader): Add extra fields to
make originator focused preloading possible. *BREAKS BACKWARDS
COMPATIBILITY*
(lt_dlloader_add): Take advantage of new fields to simplify
paramater list.
* libltdl/lt_system.h (LT_STR): New ANSI stringification macro.
(LT_CONC): Fix it to work from within macros.
* libltdl/ltdl.c (loader_init, loader_init_callback): Simplify
dlloader loading.
(get_vtable, preloaded_symbols): Point these at the preopen.c
symbols to bootstrap the loader chain.
(lt_dlinit): Load the preopen dlloader manually, and then use it
to load any other preloaded dlloaders.
(lt_dlloader_add): Simplify parameter list. Populate new
fields. Chain new loaders according to priority field.
* libltdl/ltdl.h (lt_dlsymlist): Add a new originator field.
(lt_dlpreload_callback_func): Type of a callback for automatic
lt_dlpreload_open loading.
(LTDL_SET_PRELOADED_SYMBOLS): Adjust to hook into preloaded
symbols from the "@PROGRAM@" originator.
* tests/demo/dlmain.c (main): Use mangled preloaded_symbols symbol.
* tests/pdemo/longer_file_name_dlmain.c (main): Ditto.
* ltmain.in: Don't spew spurious warnings when dlopening and
dlpreopening modules.
(func_generate_dlsyms): Factored out from multiple copies in the
rest of the code. Generate originator keyed symbol lists.
(func_extract_archives): Also factored. Extract the contents of
convenience archives for linking with dependent libraries when
--whole-archive is not available.
[darwin]: Don't try to link $old_library unless it exists, and
$lib is a bundle.
* m4/ltdl.m4 (AC_LTDL_DLLIB): Check for all possible dynamic
loading libraries/apis rather that stopping when an acceptable one
is discovered.
(LT_DLLOADERS): New variable for holding dlloaders that can be
preloaded.
* doc/libtool.texi: Document interface changes.
* NEWS: Updated.