libtool/libltdl/ltdl.h

159 lines
5.4 KiB
C
Raw Permalink Normal View History

1998-11-04 Alexandre Oliva <oliva@dcc.unicamp.br> * ltconfig.in, ltmain.in: updated and fixed the patches below 1998-11-04 Thomas Tanner <tanner@gmx.de> * mdemo/*: added new demo to demonstrate building of dlopenend modules * tests/Makefile.am, tests/mdemo*: added some tests for mdemo 1998-11-04 Gary V. Vaughan <gvaughan@oranda.demon.co.uk> * demo/configure.in: added AC_EXEEXT macro so that the tests can work on cywin32/mingw32 hosts. This requires the current CVS autoconf 1998-11-04 Thomas Tanner <tanner@gmx.de> * ltmain.in: New flag -export-symbols; new dlpreopen system * demo/dlmain.c: removed dld_preloaded_symbol_count 1998-11-04 Ian Lance Taylor <ian@cygnus.com> * ltmain.in: On installation, don't get confused if the same name appears more than once in the list of library names. 1998-11-04 Ian Lance Taylor <ian@cygnus.com> * ltconfig.in: Add objext and libext variables. Check for object suffix. Check for mingw32* as well as cygwin32*. Use objext when testing compiler. Add support for Visual C++ on cygwin32 when not using gcc. Add objext, libext, and fix_srcfile_path to generated libtool script. * ltmain.in: Use .${objext} rather than .o. Use fix_srcfile_path if it is set. Check for .obj as well as for .o, and for .lib as well as for .a. Use .${libext} rather than .a when creating old libraries. * libtoolize.in: Change initial /bin/sh to @SHELL@. * libtool.m4 (AM_PROG_LIBTOOL): Add AC_REQUIRE for AC_CANONICAL_BUILD, so that autoconf doesn't get mixed up by the AC_REQUIRE in AC_CHECK_TOOL. 1998-11-04 Ian Lance Taylor <ian@cygnus.com> * ltconfig.in: Look in the right directory for libtool.c in archive_cmds for cygwin32. 1998-11-04 Ian Lance Taylor <ian@cygnus.com> * ltconfig.in: Fix cygwin32 support to avoid using a double extension, to delete the def file, to set version_type to windows, and to include versuffix in the DLL name. * ltmain.in: Add support for a version_type of windows. 1998-11-04 Ian Lance Taylor <ian@cygnus.com> * ltconfig.in: Add cygwin32 support. * libtool.m4 (AM_PROG_LIBTOOL): Call AM_SYS_LIBTOOL_CYGWIN32 on a cygwin32 host. Pass DLLTOOL and AS to ltconfig. (AM_SYS_LIBTOOL_CYGWIN32): New macro.
1998-11-04 17:43:29 +08:00
/* ltdl.h -- generic dlopen functions
* HACKING (Licensing Rules): Explain the various license texts used for files distributed with Libtool, and update license text to match. * Makefile.am, Makefile.maint README, README.alpha, THANKS, TODO, bootstrap, clcommit.m4sh, configure.ac, libltdl/Makefile.inc, libltdl/README, libltdl/argz.c, libltdl/argz_.h, libltdl/config/general.m4sh, libltdl/config/getopt.m4sh, libltdl/config/ltmain.m4sh, libltdl/config/mailnotify.m4sh, libltdl/config/mkstamp, libltdl/configure.ac, libltdl/libltdl/lt__alloc.h, libltdl/libltdl/lt__dirent.h, libltdl/libltdl/lt__glibc.h, libltdl/libltdl/lt__private.h, libltdl/libltdl/lt__strl.h, libltdl/libltdl/lt_dlloader.h, libltdl/libltdl/lt_error.h, libltdl/libltdl/lt_system.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, libltdl/lt__alloc.c, libltdl/lt__dirent.c, libltdl/lt__strl.c, libltdl/lt_dlloader.c, libltdl/lt_error.c, libltdl/ltdl.c, libltdl/ltdl.h, libltdl/m4/argz.m4, libltdl/m4/libtool.m4, libltdl/m4/ltdl.m4, libltdl/m4/ltoptions.m4, libltdl/m4/ltsugar.m4, libltdl/m4/ltversion.in, Jlibltdl/m4/ltversion.m4, libltdl/m4/lt~obsolete.m4, libltdl/slist.c, libtoolize.m4sh, tests/am-subdir.at, tests/cdemo-conf.test, tests/cdemo-exec.test, tests/cdemo-make.test, tests/cdemo-shared.test, tests/cdemo-static.test, tests/cdemo-undef.test, tests/cdemo/Makefile.am, tests/cdemo/configure.ac, tests/cdemo/foo.c, tests/cdemo/foo.h, tests/cdemo/main.c, tests/cmdline_wrap.at, tests/convenience.at, tests/defs.m4sh, tests/demo-conf.test, tests/demo-deplibs.test, tests/demo-exec.test, tests/demo-hardcode.test, tests/demo-inst.test, tests/demo-make.test, tests/demo-nofast.test, tests/demo-noinst-link.test, tests/demo-nopic.test, tests/demo-pic.test, tests/demo-relink.test, tests/demo-shared.test, tests/demo-static.test, tests/demo-unst.test, tests/demo/Makefile.am, tests/demo/configure.ac, tests/demo/dlmain.c, tests/demo/foo.c, tests/demo/foo.h, tests/demo/hell1.c, tests/demo/hell2.c, tests/demo/hello.c, tests/demo/main.c, tests/depdemo-conf.test, tests/depdemo-exec.test, tests/depdemo-inst.test, tests/depdemo-make.test, tests/depdemo-nofast.test, tests/depdemo-relink.test, tests/depdemo-shared.test, tests/depdemo-static.test, tests/depdemo-unst.test, tests/depdemo/Makefile.am, tests/depdemo/configure.ac, tests/depdemo/l1/Makefile.am, tests/depdemo/l1/l1.c, tests/depdemo/l1/l1.h, tests/depdemo/l2/Makefile.am, tests/depdemo/l2/l2.c, tests/depdemo/l2/l2.h, tests/depdemo/l3/Makefile.am, tests/depdemo/l3/l3.c, tests/depdemo/l3/l3.h, tests/depdemo/l4/Makefile.am, tests/depdemo/l4/l4.c, tests/depdemo/l4/l4.h, tests/depdemo/main.c, tests/depdemo/sysdep.h, tests/deplibs-ident.at, tests/destdir.at, tests/duplicate_conv.at, tests/duplicate_deps.at, tests/duplicate_members.at, tests/early-libtool.at, tests/export.at, tests/f77demo-conf.test, tests/f77demo-exec.test, tests/f77demo-make.test, tests/f77demo-shared.test, tests/f77demo-static.test, tests/f77demo/Makefile.am, tests/f77demo/configure.ac, tests/f77demo/cprogram.c, tests/f77demo/foo.h, tests/f77demo/fooc.c, tests/fail.at, tests/fcdemo-conf.test, tests/fcdemo-exec.test, tests/fcdemo-make.test, tests/fcdemo-shared.test, tests/fcdemo-static.test, tests/fcdemo/Makefile.am, tests/fcdemo/configure.ac, tests/fcdemo/cprogram.c, tests/fcdemo/foo.h, tests/fcdemo/fooc.c, tests/inherited_flags.at, tests/libtoolize.at, tests/link-2.test, tests/link-order.at, tests/link-order2.at, tests/link.test, tests/lt_dlexit.at, tests/mdemo-conf.test, tests/mdemo-dryrun.test, tests/mdemo-exec.test, tests/mdemo-inst.test, tests/mdemo-make.test, tests/mdemo-shared.test, tests/mdemo-static.test, tests/mdemo-unst.test, tests/mdemo/Makefile.am, tests/mdemo/configure.ac, tests/mdemo/foo.h, tests/mdemo/foo1.c, tests/mdemo/foo2.c, tests/mdemo/main.c, tests/mdemo/mlib.c, tests/mdemo/sub.c, tests/mdemo2-conf.test, tests/mdemo2-exec.test, tests/mdemo2-make.test, tests/mdemo2/Makefile.am, tests/mdemo2/configure.ac, tests/mdemo2/main.c, tests/nomode.test, tests/nonrecursive.at, tests/objectlist.test, tests/old-m4-iface.at, tests/pdemo-conf.test, tests/pdemo-exec.test, tests/pdemo-inst.test, tests/pdemo-make.test, tests/pdemo/Makefile.am, tests/pdemo/configure.ac, tests/pdemo/foo.h, tests/pdemo/longer_file_name_dlmain.c, tests/pdemo/longer_file_name_foo.c, tests/pdemo/longer_file_name_foo2.c, tests/pdemo/longer_file_name_hell1.c, tests/pdemo/longer_file_name_hell2.c, tests/pdemo/longer_file_name_hello.c, tests/pdemo/longer_file_name_main.c, tests/quote.test, tests/recursive.at, tests/search-path.at, tests/sh.test, tests/shlibpath.at, tests/standalone.at, tests/static.at, tests/stresstest.at, tests/subproject.at, tests/suffix.test, tests/tagdemo-conf.test, tests/tagdemo-exec.test, tests/tagdemo-make.test, tests/tagdemo-shared.test, tests/tagdemo-static.test, tests/tagdemo-undef.test, tests/tagdemo/Makefile.am, tests/tagdemo/baz.cpp, tests/tagdemo/baz.h, tests/tagdemo/configure.ac, tests/tagdemo/conv.cpp, tests/tagdemo/conv.h, tests/tagdemo/foo.cpp, tests/tagdemo/foo.h, tests/tagdemo/main.cpp, tests/tagtrace.test, tests/template.at, tests/testsuite.at: Apply correct license text according to the new rules set out in HACKING.
2007-03-25 20:12:44 +08:00
Copyright (C) 1998-2000, 2004-2005, 2007-2008, 2011-2019, 2021-2024
Free Software Foundation, Inc.
* HACKING (Licensing Rules): Explain the various license texts used for files distributed with Libtool, and update license text to match. * Makefile.am, Makefile.maint README, README.alpha, THANKS, TODO, bootstrap, clcommit.m4sh, configure.ac, libltdl/Makefile.inc, libltdl/README, libltdl/argz.c, libltdl/argz_.h, libltdl/config/general.m4sh, libltdl/config/getopt.m4sh, libltdl/config/ltmain.m4sh, libltdl/config/mailnotify.m4sh, libltdl/config/mkstamp, libltdl/configure.ac, libltdl/libltdl/lt__alloc.h, libltdl/libltdl/lt__dirent.h, libltdl/libltdl/lt__glibc.h, libltdl/libltdl/lt__private.h, libltdl/libltdl/lt__strl.h, libltdl/libltdl/lt_dlloader.h, libltdl/libltdl/lt_error.h, libltdl/libltdl/lt_system.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, libltdl/lt__alloc.c, libltdl/lt__dirent.c, libltdl/lt__strl.c, libltdl/lt_dlloader.c, libltdl/lt_error.c, libltdl/ltdl.c, libltdl/ltdl.h, libltdl/m4/argz.m4, libltdl/m4/libtool.m4, libltdl/m4/ltdl.m4, libltdl/m4/ltoptions.m4, libltdl/m4/ltsugar.m4, libltdl/m4/ltversion.in, Jlibltdl/m4/ltversion.m4, libltdl/m4/lt~obsolete.m4, libltdl/slist.c, libtoolize.m4sh, tests/am-subdir.at, tests/cdemo-conf.test, tests/cdemo-exec.test, tests/cdemo-make.test, tests/cdemo-shared.test, tests/cdemo-static.test, tests/cdemo-undef.test, tests/cdemo/Makefile.am, tests/cdemo/configure.ac, tests/cdemo/foo.c, tests/cdemo/foo.h, tests/cdemo/main.c, tests/cmdline_wrap.at, tests/convenience.at, tests/defs.m4sh, tests/demo-conf.test, tests/demo-deplibs.test, tests/demo-exec.test, tests/demo-hardcode.test, tests/demo-inst.test, tests/demo-make.test, tests/demo-nofast.test, tests/demo-noinst-link.test, tests/demo-nopic.test, tests/demo-pic.test, tests/demo-relink.test, tests/demo-shared.test, tests/demo-static.test, tests/demo-unst.test, tests/demo/Makefile.am, tests/demo/configure.ac, tests/demo/dlmain.c, tests/demo/foo.c, tests/demo/foo.h, tests/demo/hell1.c, tests/demo/hell2.c, tests/demo/hello.c, tests/demo/main.c, tests/depdemo-conf.test, tests/depdemo-exec.test, tests/depdemo-inst.test, tests/depdemo-make.test, tests/depdemo-nofast.test, tests/depdemo-relink.test, tests/depdemo-shared.test, tests/depdemo-static.test, tests/depdemo-unst.test, tests/depdemo/Makefile.am, tests/depdemo/configure.ac, tests/depdemo/l1/Makefile.am, tests/depdemo/l1/l1.c, tests/depdemo/l1/l1.h, tests/depdemo/l2/Makefile.am, tests/depdemo/l2/l2.c, tests/depdemo/l2/l2.h, tests/depdemo/l3/Makefile.am, tests/depdemo/l3/l3.c, tests/depdemo/l3/l3.h, tests/depdemo/l4/Makefile.am, tests/depdemo/l4/l4.c, tests/depdemo/l4/l4.h, tests/depdemo/main.c, tests/depdemo/sysdep.h, tests/deplibs-ident.at, tests/destdir.at, tests/duplicate_conv.at, tests/duplicate_deps.at, tests/duplicate_members.at, tests/early-libtool.at, tests/export.at, tests/f77demo-conf.test, tests/f77demo-exec.test, tests/f77demo-make.test, tests/f77demo-shared.test, tests/f77demo-static.test, tests/f77demo/Makefile.am, tests/f77demo/configure.ac, tests/f77demo/cprogram.c, tests/f77demo/foo.h, tests/f77demo/fooc.c, tests/fail.at, tests/fcdemo-conf.test, tests/fcdemo-exec.test, tests/fcdemo-make.test, tests/fcdemo-shared.test, tests/fcdemo-static.test, tests/fcdemo/Makefile.am, tests/fcdemo/configure.ac, tests/fcdemo/cprogram.c, tests/fcdemo/foo.h, tests/fcdemo/fooc.c, tests/inherited_flags.at, tests/libtoolize.at, tests/link-2.test, tests/link-order.at, tests/link-order2.at, tests/link.test, tests/lt_dlexit.at, tests/mdemo-conf.test, tests/mdemo-dryrun.test, tests/mdemo-exec.test, tests/mdemo-inst.test, tests/mdemo-make.test, tests/mdemo-shared.test, tests/mdemo-static.test, tests/mdemo-unst.test, tests/mdemo/Makefile.am, tests/mdemo/configure.ac, tests/mdemo/foo.h, tests/mdemo/foo1.c, tests/mdemo/foo2.c, tests/mdemo/main.c, tests/mdemo/mlib.c, tests/mdemo/sub.c, tests/mdemo2-conf.test, tests/mdemo2-exec.test, tests/mdemo2-make.test, tests/mdemo2/Makefile.am, tests/mdemo2/configure.ac, tests/mdemo2/main.c, tests/nomode.test, tests/nonrecursive.at, tests/objectlist.test, tests/old-m4-iface.at, tests/pdemo-conf.test, tests/pdemo-exec.test, tests/pdemo-inst.test, tests/pdemo-make.test, tests/pdemo/Makefile.am, tests/pdemo/configure.ac, tests/pdemo/foo.h, tests/pdemo/longer_file_name_dlmain.c, tests/pdemo/longer_file_name_foo.c, tests/pdemo/longer_file_name_foo2.c, tests/pdemo/longer_file_name_hell1.c, tests/pdemo/longer_file_name_hell2.c, tests/pdemo/longer_file_name_hello.c, tests/pdemo/longer_file_name_main.c, tests/quote.test, tests/recursive.at, tests/search-path.at, tests/sh.test, tests/shlibpath.at, tests/standalone.at, tests/static.at, tests/stresstest.at, tests/subproject.at, tests/suffix.test, tests/tagdemo-conf.test, tests/tagdemo-exec.test, tests/tagdemo-make.test, tests/tagdemo-shared.test, tests/tagdemo-static.test, tests/tagdemo-undef.test, tests/tagdemo/Makefile.am, tests/tagdemo/baz.cpp, tests/tagdemo/baz.h, tests/tagdemo/configure.ac, tests/tagdemo/conv.cpp, tests/tagdemo/conv.h, tests/tagdemo/foo.cpp, tests/tagdemo/foo.h, tests/tagdemo/main.cpp, tests/tagtrace.test, tests/template.at, tests/testsuite.at: Apply correct license text according to the new rules set out in HACKING.
2007-03-25 20:12:44 +08:00
Written by Thomas Tanner, 1998
Keywords: There was no clean separation of abstraction layers in libltdl. The first step in fixing this is to factor out the memory management abstraction, making a start on removing promiscuity from the underlying portability layer: * doc/libtool.texi (Libltdl interface): Remove lt_dlmalloc, lt_dlrealloc and lt_dlfree references. The memory management layer used by libltdl is now private. * libltdl/lt_system.h: New installed header for system portability abstraction. * libltdl/ltdl.h: Use it. * libltdl/lt__alloc.c, libltdl/lt__alloc.h: New module above system portability layer to abstract ltdl's memory management. * libltdl/ltdl.c: Use lt__alloc.h. (closedir): Use free. (opendir): Use malloc/free. (lt__xalloc_die_callback): Report memory failures through lt_dlerror. (lt_dlinit): Use it to initialise memory management. (LT_DLMALLOC, LT_DLREALLOC, LT_DLFREE, LT_EMALLOC, LT_EREALLOC) (rpl_strdup, rpl_realloc, lt_estrdup, lt_emalloc, lt_erealloc): Removed in favour of... (lt__strdup, lt__memdup, MALLOC, REALLOC, FREE): ...these calls from libltdl/lt__alloc.h. Changed all callers. (rpl_argz_append, rpl_argz_create_sep, rpl_argz_insert): As part of the portability layer, these functions no longer use libltdl memory management API. (free_vars): Factored out. (LT_DLMEM_REASSIGN): While redoing memory handling, renamed... * libltdl/lt__alloc.h (MEMREASSIGN): ...to this. * libltdl/Makefile.am (AUTOMAKE_OPTIONS): Let automake track dependencies automatically. (pkgincludedir): Override from parent package's setting. (pkginclude_HEADERS): Install lt_system.h. (libltdl_la_SOURCES): Add new files. * NEWS: Updated. Reported by Dalibor Topic <robilad@kaffe.org>
2004-04-06 23:42:11 +08:00
NOTE: The canonical source of this file is maintained with the
GNU Libtool package. Report bugs to bug-libtool@gnu.org.
1998-11-04 Alexandre Oliva <oliva@dcc.unicamp.br> * ltconfig.in, ltmain.in: updated and fixed the patches below 1998-11-04 Thomas Tanner <tanner@gmx.de> * mdemo/*: added new demo to demonstrate building of dlopenend modules * tests/Makefile.am, tests/mdemo*: added some tests for mdemo 1998-11-04 Gary V. Vaughan <gvaughan@oranda.demon.co.uk> * demo/configure.in: added AC_EXEEXT macro so that the tests can work on cywin32/mingw32 hosts. This requires the current CVS autoconf 1998-11-04 Thomas Tanner <tanner@gmx.de> * ltmain.in: New flag -export-symbols; new dlpreopen system * demo/dlmain.c: removed dld_preloaded_symbol_count 1998-11-04 Ian Lance Taylor <ian@cygnus.com> * ltmain.in: On installation, don't get confused if the same name appears more than once in the list of library names. 1998-11-04 Ian Lance Taylor <ian@cygnus.com> * ltconfig.in: Add objext and libext variables. Check for object suffix. Check for mingw32* as well as cygwin32*. Use objext when testing compiler. Add support for Visual C++ on cygwin32 when not using gcc. Add objext, libext, and fix_srcfile_path to generated libtool script. * ltmain.in: Use .${objext} rather than .o. Use fix_srcfile_path if it is set. Check for .obj as well as for .o, and for .lib as well as for .a. Use .${libext} rather than .a when creating old libraries. * libtoolize.in: Change initial /bin/sh to @SHELL@. * libtool.m4 (AM_PROG_LIBTOOL): Add AC_REQUIRE for AC_CANONICAL_BUILD, so that autoconf doesn't get mixed up by the AC_REQUIRE in AC_CHECK_TOOL. 1998-11-04 Ian Lance Taylor <ian@cygnus.com> * ltconfig.in: Look in the right directory for libtool.c in archive_cmds for cygwin32. 1998-11-04 Ian Lance Taylor <ian@cygnus.com> * ltconfig.in: Fix cygwin32 support to avoid using a double extension, to delete the def file, to set version_type to windows, and to include versuffix in the DLL name. * ltmain.in: Add support for a version_type of windows. 1998-11-04 Ian Lance Taylor <ian@cygnus.com> * ltconfig.in: Add cygwin32 support. * libtool.m4 (AM_PROG_LIBTOOL): Call AM_SYS_LIBTOOL_CYGWIN32 on a cygwin32 host. Pass DLLTOOL and AS to ltconfig. (AM_SYS_LIBTOOL_CYGWIN32): New macro.
1998-11-04 17:43:29 +08:00
* HACKING (Licensing Rules): Explain the various license texts used for files distributed with Libtool, and update license text to match. * Makefile.am, Makefile.maint README, README.alpha, THANKS, TODO, bootstrap, clcommit.m4sh, configure.ac, libltdl/Makefile.inc, libltdl/README, libltdl/argz.c, libltdl/argz_.h, libltdl/config/general.m4sh, libltdl/config/getopt.m4sh, libltdl/config/ltmain.m4sh, libltdl/config/mailnotify.m4sh, libltdl/config/mkstamp, libltdl/configure.ac, libltdl/libltdl/lt__alloc.h, libltdl/libltdl/lt__dirent.h, libltdl/libltdl/lt__glibc.h, libltdl/libltdl/lt__private.h, libltdl/libltdl/lt__strl.h, libltdl/libltdl/lt_dlloader.h, libltdl/libltdl/lt_error.h, libltdl/libltdl/lt_system.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, libltdl/lt__alloc.c, libltdl/lt__dirent.c, libltdl/lt__strl.c, libltdl/lt_dlloader.c, libltdl/lt_error.c, libltdl/ltdl.c, libltdl/ltdl.h, libltdl/m4/argz.m4, libltdl/m4/libtool.m4, libltdl/m4/ltdl.m4, libltdl/m4/ltoptions.m4, libltdl/m4/ltsugar.m4, libltdl/m4/ltversion.in, Jlibltdl/m4/ltversion.m4, libltdl/m4/lt~obsolete.m4, libltdl/slist.c, libtoolize.m4sh, tests/am-subdir.at, tests/cdemo-conf.test, tests/cdemo-exec.test, tests/cdemo-make.test, tests/cdemo-shared.test, tests/cdemo-static.test, tests/cdemo-undef.test, tests/cdemo/Makefile.am, tests/cdemo/configure.ac, tests/cdemo/foo.c, tests/cdemo/foo.h, tests/cdemo/main.c, tests/cmdline_wrap.at, tests/convenience.at, tests/defs.m4sh, tests/demo-conf.test, tests/demo-deplibs.test, tests/demo-exec.test, tests/demo-hardcode.test, tests/demo-inst.test, tests/demo-make.test, tests/demo-nofast.test, tests/demo-noinst-link.test, tests/demo-nopic.test, tests/demo-pic.test, tests/demo-relink.test, tests/demo-shared.test, tests/demo-static.test, tests/demo-unst.test, tests/demo/Makefile.am, tests/demo/configure.ac, tests/demo/dlmain.c, tests/demo/foo.c, tests/demo/foo.h, tests/demo/hell1.c, tests/demo/hell2.c, tests/demo/hello.c, tests/demo/main.c, tests/depdemo-conf.test, tests/depdemo-exec.test, tests/depdemo-inst.test, tests/depdemo-make.test, tests/depdemo-nofast.test, tests/depdemo-relink.test, tests/depdemo-shared.test, tests/depdemo-static.test, tests/depdemo-unst.test, tests/depdemo/Makefile.am, tests/depdemo/configure.ac, tests/depdemo/l1/Makefile.am, tests/depdemo/l1/l1.c, tests/depdemo/l1/l1.h, tests/depdemo/l2/Makefile.am, tests/depdemo/l2/l2.c, tests/depdemo/l2/l2.h, tests/depdemo/l3/Makefile.am, tests/depdemo/l3/l3.c, tests/depdemo/l3/l3.h, tests/depdemo/l4/Makefile.am, tests/depdemo/l4/l4.c, tests/depdemo/l4/l4.h, tests/depdemo/main.c, tests/depdemo/sysdep.h, tests/deplibs-ident.at, tests/destdir.at, tests/duplicate_conv.at, tests/duplicate_deps.at, tests/duplicate_members.at, tests/early-libtool.at, tests/export.at, tests/f77demo-conf.test, tests/f77demo-exec.test, tests/f77demo-make.test, tests/f77demo-shared.test, tests/f77demo-static.test, tests/f77demo/Makefile.am, tests/f77demo/configure.ac, tests/f77demo/cprogram.c, tests/f77demo/foo.h, tests/f77demo/fooc.c, tests/fail.at, tests/fcdemo-conf.test, tests/fcdemo-exec.test, tests/fcdemo-make.test, tests/fcdemo-shared.test, tests/fcdemo-static.test, tests/fcdemo/Makefile.am, tests/fcdemo/configure.ac, tests/fcdemo/cprogram.c, tests/fcdemo/foo.h, tests/fcdemo/fooc.c, tests/inherited_flags.at, tests/libtoolize.at, tests/link-2.test, tests/link-order.at, tests/link-order2.at, tests/link.test, tests/lt_dlexit.at, tests/mdemo-conf.test, tests/mdemo-dryrun.test, tests/mdemo-exec.test, tests/mdemo-inst.test, tests/mdemo-make.test, tests/mdemo-shared.test, tests/mdemo-static.test, tests/mdemo-unst.test, tests/mdemo/Makefile.am, tests/mdemo/configure.ac, tests/mdemo/foo.h, tests/mdemo/foo1.c, tests/mdemo/foo2.c, tests/mdemo/main.c, tests/mdemo/mlib.c, tests/mdemo/sub.c, tests/mdemo2-conf.test, tests/mdemo2-exec.test, tests/mdemo2-make.test, tests/mdemo2/Makefile.am, tests/mdemo2/configure.ac, tests/mdemo2/main.c, tests/nomode.test, tests/nonrecursive.at, tests/objectlist.test, tests/old-m4-iface.at, tests/pdemo-conf.test, tests/pdemo-exec.test, tests/pdemo-inst.test, tests/pdemo-make.test, tests/pdemo/Makefile.am, tests/pdemo/configure.ac, tests/pdemo/foo.h, tests/pdemo/longer_file_name_dlmain.c, tests/pdemo/longer_file_name_foo.c, tests/pdemo/longer_file_name_foo2.c, tests/pdemo/longer_file_name_hell1.c, tests/pdemo/longer_file_name_hell2.c, tests/pdemo/longer_file_name_hello.c, tests/pdemo/longer_file_name_main.c, tests/quote.test, tests/recursive.at, tests/search-path.at, tests/sh.test, tests/shlibpath.at, tests/standalone.at, tests/static.at, tests/stresstest.at, tests/subproject.at, tests/suffix.test, tests/tagdemo-conf.test, tests/tagdemo-exec.test, tests/tagdemo-make.test, tests/tagdemo-shared.test, tests/tagdemo-static.test, tests/tagdemo-undef.test, tests/tagdemo/Makefile.am, tests/tagdemo/baz.cpp, tests/tagdemo/baz.h, tests/tagdemo/configure.ac, tests/tagdemo/conv.cpp, tests/tagdemo/conv.h, tests/tagdemo/foo.cpp, tests/tagdemo/foo.h, tests/tagdemo/main.cpp, tests/tagtrace.test, tests/template.at, tests/testsuite.at: Apply correct license text according to the new rules set out in HACKING.
2007-03-25 20:12:44 +08:00
GNU Libltdl is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
1998-11-24 05:26:38 +08:00
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
1998-11-04 Alexandre Oliva <oliva@dcc.unicamp.br> * ltconfig.in, ltmain.in: updated and fixed the patches below 1998-11-04 Thomas Tanner <tanner@gmx.de> * mdemo/*: added new demo to demonstrate building of dlopenend modules * tests/Makefile.am, tests/mdemo*: added some tests for mdemo 1998-11-04 Gary V. Vaughan <gvaughan@oranda.demon.co.uk> * demo/configure.in: added AC_EXEEXT macro so that the tests can work on cywin32/mingw32 hosts. This requires the current CVS autoconf 1998-11-04 Thomas Tanner <tanner@gmx.de> * ltmain.in: New flag -export-symbols; new dlpreopen system * demo/dlmain.c: removed dld_preloaded_symbol_count 1998-11-04 Ian Lance Taylor <ian@cygnus.com> * ltmain.in: On installation, don't get confused if the same name appears more than once in the list of library names. 1998-11-04 Ian Lance Taylor <ian@cygnus.com> * ltconfig.in: Add objext and libext variables. Check for object suffix. Check for mingw32* as well as cygwin32*. Use objext when testing compiler. Add support for Visual C++ on cygwin32 when not using gcc. Add objext, libext, and fix_srcfile_path to generated libtool script. * ltmain.in: Use .${objext} rather than .o. Use fix_srcfile_path if it is set. Check for .obj as well as for .o, and for .lib as well as for .a. Use .${libext} rather than .a when creating old libraries. * libtoolize.in: Change initial /bin/sh to @SHELL@. * libtool.m4 (AM_PROG_LIBTOOL): Add AC_REQUIRE for AC_CANONICAL_BUILD, so that autoconf doesn't get mixed up by the AC_REQUIRE in AC_CHECK_TOOL. 1998-11-04 Ian Lance Taylor <ian@cygnus.com> * ltconfig.in: Look in the right directory for libtool.c in archive_cmds for cygwin32. 1998-11-04 Ian Lance Taylor <ian@cygnus.com> * ltconfig.in: Fix cygwin32 support to avoid using a double extension, to delete the def file, to set version_type to windows, and to include versuffix in the DLL name. * ltmain.in: Add support for a version_type of windows. 1998-11-04 Ian Lance Taylor <ian@cygnus.com> * ltconfig.in: Add cygwin32 support. * libtool.m4 (AM_PROG_LIBTOOL): Call AM_SYS_LIBTOOL_CYGWIN32 on a cygwin32 host. Pass DLLTOOL and AS to ltconfig. (AM_SYS_LIBTOOL_CYGWIN32): New macro.
1998-11-04 17:43:29 +08:00
As a special exception to the GNU Lesser General Public License,
if you distribute this file as part of a program or library that
* HACKING (Licensing Rules): Explain the various license texts used for files distributed with Libtool, and update license text to match. * Makefile.am, Makefile.maint README, README.alpha, THANKS, TODO, bootstrap, clcommit.m4sh, configure.ac, libltdl/Makefile.inc, libltdl/README, libltdl/argz.c, libltdl/argz_.h, libltdl/config/general.m4sh, libltdl/config/getopt.m4sh, libltdl/config/ltmain.m4sh, libltdl/config/mailnotify.m4sh, libltdl/config/mkstamp, libltdl/configure.ac, libltdl/libltdl/lt__alloc.h, libltdl/libltdl/lt__dirent.h, libltdl/libltdl/lt__glibc.h, libltdl/libltdl/lt__private.h, libltdl/libltdl/lt__strl.h, libltdl/libltdl/lt_dlloader.h, libltdl/libltdl/lt_error.h, libltdl/libltdl/lt_system.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, libltdl/lt__alloc.c, libltdl/lt__dirent.c, libltdl/lt__strl.c, libltdl/lt_dlloader.c, libltdl/lt_error.c, libltdl/ltdl.c, libltdl/ltdl.h, libltdl/m4/argz.m4, libltdl/m4/libtool.m4, libltdl/m4/ltdl.m4, libltdl/m4/ltoptions.m4, libltdl/m4/ltsugar.m4, libltdl/m4/ltversion.in, Jlibltdl/m4/ltversion.m4, libltdl/m4/lt~obsolete.m4, libltdl/slist.c, libtoolize.m4sh, tests/am-subdir.at, tests/cdemo-conf.test, tests/cdemo-exec.test, tests/cdemo-make.test, tests/cdemo-shared.test, tests/cdemo-static.test, tests/cdemo-undef.test, tests/cdemo/Makefile.am, tests/cdemo/configure.ac, tests/cdemo/foo.c, tests/cdemo/foo.h, tests/cdemo/main.c, tests/cmdline_wrap.at, tests/convenience.at, tests/defs.m4sh, tests/demo-conf.test, tests/demo-deplibs.test, tests/demo-exec.test, tests/demo-hardcode.test, tests/demo-inst.test, tests/demo-make.test, tests/demo-nofast.test, tests/demo-noinst-link.test, tests/demo-nopic.test, tests/demo-pic.test, tests/demo-relink.test, tests/demo-shared.test, tests/demo-static.test, tests/demo-unst.test, tests/demo/Makefile.am, tests/demo/configure.ac, tests/demo/dlmain.c, tests/demo/foo.c, tests/demo/foo.h, tests/demo/hell1.c, tests/demo/hell2.c, tests/demo/hello.c, tests/demo/main.c, tests/depdemo-conf.test, tests/depdemo-exec.test, tests/depdemo-inst.test, tests/depdemo-make.test, tests/depdemo-nofast.test, tests/depdemo-relink.test, tests/depdemo-shared.test, tests/depdemo-static.test, tests/depdemo-unst.test, tests/depdemo/Makefile.am, tests/depdemo/configure.ac, tests/depdemo/l1/Makefile.am, tests/depdemo/l1/l1.c, tests/depdemo/l1/l1.h, tests/depdemo/l2/Makefile.am, tests/depdemo/l2/l2.c, tests/depdemo/l2/l2.h, tests/depdemo/l3/Makefile.am, tests/depdemo/l3/l3.c, tests/depdemo/l3/l3.h, tests/depdemo/l4/Makefile.am, tests/depdemo/l4/l4.c, tests/depdemo/l4/l4.h, tests/depdemo/main.c, tests/depdemo/sysdep.h, tests/deplibs-ident.at, tests/destdir.at, tests/duplicate_conv.at, tests/duplicate_deps.at, tests/duplicate_members.at, tests/early-libtool.at, tests/export.at, tests/f77demo-conf.test, tests/f77demo-exec.test, tests/f77demo-make.test, tests/f77demo-shared.test, tests/f77demo-static.test, tests/f77demo/Makefile.am, tests/f77demo/configure.ac, tests/f77demo/cprogram.c, tests/f77demo/foo.h, tests/f77demo/fooc.c, tests/fail.at, tests/fcdemo-conf.test, tests/fcdemo-exec.test, tests/fcdemo-make.test, tests/fcdemo-shared.test, tests/fcdemo-static.test, tests/fcdemo/Makefile.am, tests/fcdemo/configure.ac, tests/fcdemo/cprogram.c, tests/fcdemo/foo.h, tests/fcdemo/fooc.c, tests/inherited_flags.at, tests/libtoolize.at, tests/link-2.test, tests/link-order.at, tests/link-order2.at, tests/link.test, tests/lt_dlexit.at, tests/mdemo-conf.test, tests/mdemo-dryrun.test, tests/mdemo-exec.test, tests/mdemo-inst.test, tests/mdemo-make.test, tests/mdemo-shared.test, tests/mdemo-static.test, tests/mdemo-unst.test, tests/mdemo/Makefile.am, tests/mdemo/configure.ac, tests/mdemo/foo.h, tests/mdemo/foo1.c, tests/mdemo/foo2.c, tests/mdemo/main.c, tests/mdemo/mlib.c, tests/mdemo/sub.c, tests/mdemo2-conf.test, tests/mdemo2-exec.test, tests/mdemo2-make.test, tests/mdemo2/Makefile.am, tests/mdemo2/configure.ac, tests/mdemo2/main.c, tests/nomode.test, tests/nonrecursive.at, tests/objectlist.test, tests/old-m4-iface.at, tests/pdemo-conf.test, tests/pdemo-exec.test, tests/pdemo-inst.test, tests/pdemo-make.test, tests/pdemo/Makefile.am, tests/pdemo/configure.ac, tests/pdemo/foo.h, tests/pdemo/longer_file_name_dlmain.c, tests/pdemo/longer_file_name_foo.c, tests/pdemo/longer_file_name_foo2.c, tests/pdemo/longer_file_name_hell1.c, tests/pdemo/longer_file_name_hell2.c, tests/pdemo/longer_file_name_hello.c, tests/pdemo/longer_file_name_main.c, tests/quote.test, tests/recursive.at, tests/search-path.at, tests/sh.test, tests/shlibpath.at, tests/standalone.at, tests/static.at, tests/stresstest.at, tests/subproject.at, tests/suffix.test, tests/tagdemo-conf.test, tests/tagdemo-exec.test, tests/tagdemo-make.test, tests/tagdemo-shared.test, tests/tagdemo-static.test, tests/tagdemo-undef.test, tests/tagdemo/Makefile.am, tests/tagdemo/baz.cpp, tests/tagdemo/baz.h, tests/tagdemo/configure.ac, tests/tagdemo/conv.cpp, tests/tagdemo/conv.h, tests/tagdemo/foo.cpp, tests/tagdemo/foo.h, tests/tagdemo/main.cpp, tests/tagtrace.test, tests/template.at, tests/testsuite.at: Apply correct license text according to the new rules set out in HACKING.
2007-03-25 20:12:44 +08:00
is built using GNU Libtool, you may include this file under the
same distribution terms that you use for the rest of that program.
* HACKING (Licensing Rules): Explain the various license texts used for files distributed with Libtool, and update license text to match. * Makefile.am, Makefile.maint README, README.alpha, THANKS, TODO, bootstrap, clcommit.m4sh, configure.ac, libltdl/Makefile.inc, libltdl/README, libltdl/argz.c, libltdl/argz_.h, libltdl/config/general.m4sh, libltdl/config/getopt.m4sh, libltdl/config/ltmain.m4sh, libltdl/config/mailnotify.m4sh, libltdl/config/mkstamp, libltdl/configure.ac, libltdl/libltdl/lt__alloc.h, libltdl/libltdl/lt__dirent.h, libltdl/libltdl/lt__glibc.h, libltdl/libltdl/lt__private.h, libltdl/libltdl/lt__strl.h, libltdl/libltdl/lt_dlloader.h, libltdl/libltdl/lt_error.h, libltdl/libltdl/lt_system.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, libltdl/lt__alloc.c, libltdl/lt__dirent.c, libltdl/lt__strl.c, libltdl/lt_dlloader.c, libltdl/lt_error.c, libltdl/ltdl.c, libltdl/ltdl.h, libltdl/m4/argz.m4, libltdl/m4/libtool.m4, libltdl/m4/ltdl.m4, libltdl/m4/ltoptions.m4, libltdl/m4/ltsugar.m4, libltdl/m4/ltversion.in, Jlibltdl/m4/ltversion.m4, libltdl/m4/lt~obsolete.m4, libltdl/slist.c, libtoolize.m4sh, tests/am-subdir.at, tests/cdemo-conf.test, tests/cdemo-exec.test, tests/cdemo-make.test, tests/cdemo-shared.test, tests/cdemo-static.test, tests/cdemo-undef.test, tests/cdemo/Makefile.am, tests/cdemo/configure.ac, tests/cdemo/foo.c, tests/cdemo/foo.h, tests/cdemo/main.c, tests/cmdline_wrap.at, tests/convenience.at, tests/defs.m4sh, tests/demo-conf.test, tests/demo-deplibs.test, tests/demo-exec.test, tests/demo-hardcode.test, tests/demo-inst.test, tests/demo-make.test, tests/demo-nofast.test, tests/demo-noinst-link.test, tests/demo-nopic.test, tests/demo-pic.test, tests/demo-relink.test, tests/demo-shared.test, tests/demo-static.test, tests/demo-unst.test, tests/demo/Makefile.am, tests/demo/configure.ac, tests/demo/dlmain.c, tests/demo/foo.c, tests/demo/foo.h, tests/demo/hell1.c, tests/demo/hell2.c, tests/demo/hello.c, tests/demo/main.c, tests/depdemo-conf.test, tests/depdemo-exec.test, tests/depdemo-inst.test, tests/depdemo-make.test, tests/depdemo-nofast.test, tests/depdemo-relink.test, tests/depdemo-shared.test, tests/depdemo-static.test, tests/depdemo-unst.test, tests/depdemo/Makefile.am, tests/depdemo/configure.ac, tests/depdemo/l1/Makefile.am, tests/depdemo/l1/l1.c, tests/depdemo/l1/l1.h, tests/depdemo/l2/Makefile.am, tests/depdemo/l2/l2.c, tests/depdemo/l2/l2.h, tests/depdemo/l3/Makefile.am, tests/depdemo/l3/l3.c, tests/depdemo/l3/l3.h, tests/depdemo/l4/Makefile.am, tests/depdemo/l4/l4.c, tests/depdemo/l4/l4.h, tests/depdemo/main.c, tests/depdemo/sysdep.h, tests/deplibs-ident.at, tests/destdir.at, tests/duplicate_conv.at, tests/duplicate_deps.at, tests/duplicate_members.at, tests/early-libtool.at, tests/export.at, tests/f77demo-conf.test, tests/f77demo-exec.test, tests/f77demo-make.test, tests/f77demo-shared.test, tests/f77demo-static.test, tests/f77demo/Makefile.am, tests/f77demo/configure.ac, tests/f77demo/cprogram.c, tests/f77demo/foo.h, tests/f77demo/fooc.c, tests/fail.at, tests/fcdemo-conf.test, tests/fcdemo-exec.test, tests/fcdemo-make.test, tests/fcdemo-shared.test, tests/fcdemo-static.test, tests/fcdemo/Makefile.am, tests/fcdemo/configure.ac, tests/fcdemo/cprogram.c, tests/fcdemo/foo.h, tests/fcdemo/fooc.c, tests/inherited_flags.at, tests/libtoolize.at, tests/link-2.test, tests/link-order.at, tests/link-order2.at, tests/link.test, tests/lt_dlexit.at, tests/mdemo-conf.test, tests/mdemo-dryrun.test, tests/mdemo-exec.test, tests/mdemo-inst.test, tests/mdemo-make.test, tests/mdemo-shared.test, tests/mdemo-static.test, tests/mdemo-unst.test, tests/mdemo/Makefile.am, tests/mdemo/configure.ac, tests/mdemo/foo.h, tests/mdemo/foo1.c, tests/mdemo/foo2.c, tests/mdemo/main.c, tests/mdemo/mlib.c, tests/mdemo/sub.c, tests/mdemo2-conf.test, tests/mdemo2-exec.test, tests/mdemo2-make.test, tests/mdemo2/Makefile.am, tests/mdemo2/configure.ac, tests/mdemo2/main.c, tests/nomode.test, tests/nonrecursive.at, tests/objectlist.test, tests/old-m4-iface.at, tests/pdemo-conf.test, tests/pdemo-exec.test, tests/pdemo-inst.test, tests/pdemo-make.test, tests/pdemo/Makefile.am, tests/pdemo/configure.ac, tests/pdemo/foo.h, tests/pdemo/longer_file_name_dlmain.c, tests/pdemo/longer_file_name_foo.c, tests/pdemo/longer_file_name_foo2.c, tests/pdemo/longer_file_name_hell1.c, tests/pdemo/longer_file_name_hell2.c, tests/pdemo/longer_file_name_hello.c, tests/pdemo/longer_file_name_main.c, tests/quote.test, tests/recursive.at, tests/search-path.at, tests/sh.test, tests/shlibpath.at, tests/standalone.at, tests/static.at, tests/stresstest.at, tests/subproject.at, tests/suffix.test, tests/tagdemo-conf.test, tests/tagdemo-exec.test, tests/tagdemo-make.test, tests/tagdemo-shared.test, tests/tagdemo-static.test, tests/tagdemo-undef.test, tests/tagdemo/Makefile.am, tests/tagdemo/baz.cpp, tests/tagdemo/baz.h, tests/tagdemo/configure.ac, tests/tagdemo/conv.cpp, tests/tagdemo/conv.h, tests/tagdemo/foo.cpp, tests/tagdemo/foo.h, tests/tagdemo/main.cpp, tests/tagtrace.test, tests/template.at, tests/testsuite.at: Apply correct license text according to the new rules set out in HACKING.
2007-03-25 20:12:44 +08:00
GNU Libltdl is distributed in the hope that it will be useful,
1998-11-04 Alexandre Oliva <oliva@dcc.unicamp.br> * ltconfig.in, ltmain.in: updated and fixed the patches below 1998-11-04 Thomas Tanner <tanner@gmx.de> * mdemo/*: added new demo to demonstrate building of dlopenend modules * tests/Makefile.am, tests/mdemo*: added some tests for mdemo 1998-11-04 Gary V. Vaughan <gvaughan@oranda.demon.co.uk> * demo/configure.in: added AC_EXEEXT macro so that the tests can work on cywin32/mingw32 hosts. This requires the current CVS autoconf 1998-11-04 Thomas Tanner <tanner@gmx.de> * ltmain.in: New flag -export-symbols; new dlpreopen system * demo/dlmain.c: removed dld_preloaded_symbol_count 1998-11-04 Ian Lance Taylor <ian@cygnus.com> * ltmain.in: On installation, don't get confused if the same name appears more than once in the list of library names. 1998-11-04 Ian Lance Taylor <ian@cygnus.com> * ltconfig.in: Add objext and libext variables. Check for object suffix. Check for mingw32* as well as cygwin32*. Use objext when testing compiler. Add support for Visual C++ on cygwin32 when not using gcc. Add objext, libext, and fix_srcfile_path to generated libtool script. * ltmain.in: Use .${objext} rather than .o. Use fix_srcfile_path if it is set. Check for .obj as well as for .o, and for .lib as well as for .a. Use .${libext} rather than .a when creating old libraries. * libtoolize.in: Change initial /bin/sh to @SHELL@. * libtool.m4 (AM_PROG_LIBTOOL): Add AC_REQUIRE for AC_CANONICAL_BUILD, so that autoconf doesn't get mixed up by the AC_REQUIRE in AC_CHECK_TOOL. 1998-11-04 Ian Lance Taylor <ian@cygnus.com> * ltconfig.in: Look in the right directory for libtool.c in archive_cmds for cygwin32. 1998-11-04 Ian Lance Taylor <ian@cygnus.com> * ltconfig.in: Fix cygwin32 support to avoid using a double extension, to delete the def file, to set version_type to windows, and to include versuffix in the DLL name. * ltmain.in: Add support for a version_type of windows. 1998-11-04 Ian Lance Taylor <ian@cygnus.com> * ltconfig.in: Add cygwin32 support. * libtool.m4 (AM_PROG_LIBTOOL): Call AM_SYS_LIBTOOL_CYGWIN32 on a cygwin32 host. Pass DLLTOOL and AS to ltconfig. (AM_SYS_LIBTOOL_CYGWIN32): New macro.
1998-11-04 17:43:29 +08:00
but WITHOUT ANY WARRANTY; without even the implied warranty of
* HACKING (Licensing Rules): Explain the various license texts used for files distributed with Libtool, and update license text to match. * Makefile.am, Makefile.maint README, README.alpha, THANKS, TODO, bootstrap, clcommit.m4sh, configure.ac, libltdl/Makefile.inc, libltdl/README, libltdl/argz.c, libltdl/argz_.h, libltdl/config/general.m4sh, libltdl/config/getopt.m4sh, libltdl/config/ltmain.m4sh, libltdl/config/mailnotify.m4sh, libltdl/config/mkstamp, libltdl/configure.ac, libltdl/libltdl/lt__alloc.h, libltdl/libltdl/lt__dirent.h, libltdl/libltdl/lt__glibc.h, libltdl/libltdl/lt__private.h, libltdl/libltdl/lt__strl.h, libltdl/libltdl/lt_dlloader.h, libltdl/libltdl/lt_error.h, libltdl/libltdl/lt_system.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, libltdl/lt__alloc.c, libltdl/lt__dirent.c, libltdl/lt__strl.c, libltdl/lt_dlloader.c, libltdl/lt_error.c, libltdl/ltdl.c, libltdl/ltdl.h, libltdl/m4/argz.m4, libltdl/m4/libtool.m4, libltdl/m4/ltdl.m4, libltdl/m4/ltoptions.m4, libltdl/m4/ltsugar.m4, libltdl/m4/ltversion.in, Jlibltdl/m4/ltversion.m4, libltdl/m4/lt~obsolete.m4, libltdl/slist.c, libtoolize.m4sh, tests/am-subdir.at, tests/cdemo-conf.test, tests/cdemo-exec.test, tests/cdemo-make.test, tests/cdemo-shared.test, tests/cdemo-static.test, tests/cdemo-undef.test, tests/cdemo/Makefile.am, tests/cdemo/configure.ac, tests/cdemo/foo.c, tests/cdemo/foo.h, tests/cdemo/main.c, tests/cmdline_wrap.at, tests/convenience.at, tests/defs.m4sh, tests/demo-conf.test, tests/demo-deplibs.test, tests/demo-exec.test, tests/demo-hardcode.test, tests/demo-inst.test, tests/demo-make.test, tests/demo-nofast.test, tests/demo-noinst-link.test, tests/demo-nopic.test, tests/demo-pic.test, tests/demo-relink.test, tests/demo-shared.test, tests/demo-static.test, tests/demo-unst.test, tests/demo/Makefile.am, tests/demo/configure.ac, tests/demo/dlmain.c, tests/demo/foo.c, tests/demo/foo.h, tests/demo/hell1.c, tests/demo/hell2.c, tests/demo/hello.c, tests/demo/main.c, tests/depdemo-conf.test, tests/depdemo-exec.test, tests/depdemo-inst.test, tests/depdemo-make.test, tests/depdemo-nofast.test, tests/depdemo-relink.test, tests/depdemo-shared.test, tests/depdemo-static.test, tests/depdemo-unst.test, tests/depdemo/Makefile.am, tests/depdemo/configure.ac, tests/depdemo/l1/Makefile.am, tests/depdemo/l1/l1.c, tests/depdemo/l1/l1.h, tests/depdemo/l2/Makefile.am, tests/depdemo/l2/l2.c, tests/depdemo/l2/l2.h, tests/depdemo/l3/Makefile.am, tests/depdemo/l3/l3.c, tests/depdemo/l3/l3.h, tests/depdemo/l4/Makefile.am, tests/depdemo/l4/l4.c, tests/depdemo/l4/l4.h, tests/depdemo/main.c, tests/depdemo/sysdep.h, tests/deplibs-ident.at, tests/destdir.at, tests/duplicate_conv.at, tests/duplicate_deps.at, tests/duplicate_members.at, tests/early-libtool.at, tests/export.at, tests/f77demo-conf.test, tests/f77demo-exec.test, tests/f77demo-make.test, tests/f77demo-shared.test, tests/f77demo-static.test, tests/f77demo/Makefile.am, tests/f77demo/configure.ac, tests/f77demo/cprogram.c, tests/f77demo/foo.h, tests/f77demo/fooc.c, tests/fail.at, tests/fcdemo-conf.test, tests/fcdemo-exec.test, tests/fcdemo-make.test, tests/fcdemo-shared.test, tests/fcdemo-static.test, tests/fcdemo/Makefile.am, tests/fcdemo/configure.ac, tests/fcdemo/cprogram.c, tests/fcdemo/foo.h, tests/fcdemo/fooc.c, tests/inherited_flags.at, tests/libtoolize.at, tests/link-2.test, tests/link-order.at, tests/link-order2.at, tests/link.test, tests/lt_dlexit.at, tests/mdemo-conf.test, tests/mdemo-dryrun.test, tests/mdemo-exec.test, tests/mdemo-inst.test, tests/mdemo-make.test, tests/mdemo-shared.test, tests/mdemo-static.test, tests/mdemo-unst.test, tests/mdemo/Makefile.am, tests/mdemo/configure.ac, tests/mdemo/foo.h, tests/mdemo/foo1.c, tests/mdemo/foo2.c, tests/mdemo/main.c, tests/mdemo/mlib.c, tests/mdemo/sub.c, tests/mdemo2-conf.test, tests/mdemo2-exec.test, tests/mdemo2-make.test, tests/mdemo2/Makefile.am, tests/mdemo2/configure.ac, tests/mdemo2/main.c, tests/nomode.test, tests/nonrecursive.at, tests/objectlist.test, tests/old-m4-iface.at, tests/pdemo-conf.test, tests/pdemo-exec.test, tests/pdemo-inst.test, tests/pdemo-make.test, tests/pdemo/Makefile.am, tests/pdemo/configure.ac, tests/pdemo/foo.h, tests/pdemo/longer_file_name_dlmain.c, tests/pdemo/longer_file_name_foo.c, tests/pdemo/longer_file_name_foo2.c, tests/pdemo/longer_file_name_hell1.c, tests/pdemo/longer_file_name_hell2.c, tests/pdemo/longer_file_name_hello.c, tests/pdemo/longer_file_name_main.c, tests/quote.test, tests/recursive.at, tests/search-path.at, tests/sh.test, tests/shlibpath.at, tests/standalone.at, tests/static.at, tests/stresstest.at, tests/subproject.at, tests/suffix.test, tests/tagdemo-conf.test, tests/tagdemo-exec.test, tests/tagdemo-make.test, tests/tagdemo-shared.test, tests/tagdemo-static.test, tests/tagdemo-undef.test, tests/tagdemo/Makefile.am, tests/tagdemo/baz.cpp, tests/tagdemo/baz.h, tests/tagdemo/configure.ac, tests/tagdemo/conv.cpp, tests/tagdemo/conv.h, tests/tagdemo/foo.cpp, tests/tagdemo/foo.h, tests/tagdemo/main.cpp, tests/tagtrace.test, tests/template.at, tests/testsuite.at: Apply correct license text according to the new rules set out in HACKING.
2007-03-25 20:12:44 +08:00
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Lesser General Public License for more details.
1998-11-04 Alexandre Oliva <oliva@dcc.unicamp.br> * ltconfig.in, ltmain.in: updated and fixed the patches below 1998-11-04 Thomas Tanner <tanner@gmx.de> * mdemo/*: added new demo to demonstrate building of dlopenend modules * tests/Makefile.am, tests/mdemo*: added some tests for mdemo 1998-11-04 Gary V. Vaughan <gvaughan@oranda.demon.co.uk> * demo/configure.in: added AC_EXEEXT macro so that the tests can work on cywin32/mingw32 hosts. This requires the current CVS autoconf 1998-11-04 Thomas Tanner <tanner@gmx.de> * ltmain.in: New flag -export-symbols; new dlpreopen system * demo/dlmain.c: removed dld_preloaded_symbol_count 1998-11-04 Ian Lance Taylor <ian@cygnus.com> * ltmain.in: On installation, don't get confused if the same name appears more than once in the list of library names. 1998-11-04 Ian Lance Taylor <ian@cygnus.com> * ltconfig.in: Add objext and libext variables. Check for object suffix. Check for mingw32* as well as cygwin32*. Use objext when testing compiler. Add support for Visual C++ on cygwin32 when not using gcc. Add objext, libext, and fix_srcfile_path to generated libtool script. * ltmain.in: Use .${objext} rather than .o. Use fix_srcfile_path if it is set. Check for .obj as well as for .o, and for .lib as well as for .a. Use .${libext} rather than .a when creating old libraries. * libtoolize.in: Change initial /bin/sh to @SHELL@. * libtool.m4 (AM_PROG_LIBTOOL): Add AC_REQUIRE for AC_CANONICAL_BUILD, so that autoconf doesn't get mixed up by the AC_REQUIRE in AC_CHECK_TOOL. 1998-11-04 Ian Lance Taylor <ian@cygnus.com> * ltconfig.in: Look in the right directory for libtool.c in archive_cmds for cygwin32. 1998-11-04 Ian Lance Taylor <ian@cygnus.com> * ltconfig.in: Fix cygwin32 support to avoid using a double extension, to delete the def file, to set version_type to windows, and to include versuffix in the DLL name. * ltmain.in: Add support for a version_type of windows. 1998-11-04 Ian Lance Taylor <ian@cygnus.com> * ltconfig.in: Add cygwin32 support. * libtool.m4 (AM_PROG_LIBTOOL): Call AM_SYS_LIBTOOL_CYGWIN32 on a cygwin32 host. Pass DLLTOOL and AS to ltconfig. (AM_SYS_LIBTOOL_CYGWIN32): New macro.
1998-11-04 17:43:29 +08:00
You should have received a copy of the GNU Lesser General Public
libtool: FSF office address replaced by URL * AUTHORS, HACKING, Makefile.am, bootstrap.conf, build-aux/edit-readme-alpha, build-aux/no-bogus-m4-defines, cfg.mk, configure.ac, libltdl/configure.ac, libltdl/libltdl/lt__alloc.h, libltdl/libltdl/lt__argz_.h, libltdl/libltdl/lt__dirent.h, libltdl/libltdl/lt__glibc.h, libltdl/libltdl/lt__private.h, libltdl/libltdl/lt__strl.h, libltdl/libltdl/lt_dlloader.h, libltdl/libltdl/lt_error.h, libltdl/libltdl/lt_system.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, libltdl/lt__alloc.c, libltdl/lt__argz.c, libltdl/lt__dirent.c, libltdl/lt__strl.c, libltdl/lt_dlloader.c, libltdl/lt_error.c, libltdl/ltdl.c, libltdl/ltdl.h, libltdl/ltdl.mk, libltdl/slist.c, tests/am-subdir.at, tests/archive-in-archive.at, tests/bindir.at, tests/bug_62343.at, tests/cdemo.at, tests/cmdline_wrap.at, tests/configure-funcs.at, tests/configure-iface.at, tests/convenience.at, tests/ctor.at, tests/cwrapper.at, tests/darwin.at, tests/demo.at, tests/depdemo.at, tests/deplib-in-subdir.at, tests/deplibs-ident.at, tests/deplibs-mingw.at, tests/destdir.at, tests/dlloader-api.at, tests/dumpbin-symbols.at, tests/duplicate_conv.at, tests/duplicate_deps.at, tests/duplicate_members.at, tests/early-libtool.at, tests/exceptions.at, tests/execute-mode.at, tests/exeext.at, tests/export-def.at, tests/export.at, tests/f77demo.at, tests/fail.at, tests/fcdemo.at, tests/flags.at, tests/help.at, tests/indirect_deps.at, tests/infer-tag.at, tests/inherited_flags.at, tests/install.at, tests/lalib-syntax.at, tests/libtool.at, tests/libtoolize.at, tests/link-order.at, tests/link-order2.at, tests/loadlibrary.at, tests/localization.at, tests/lt_dladvise.at, tests/lt_dlexit.at, tests/lt_dlopen.at, tests/lt_dlopen_a.at, tests/lt_dlopenext.at, tests/ltdl-api.at, tests/ltdl-libdir.at, tests/mdemo.at, tests/need_lib_prefix.at, tests/no-executables.at, tests/nocase.at, tests/nonrecursive.at, tests/old-m4-iface.at, tests/pic_flag.at, tests/recursive.at, tests/resident.at, tests/runpath-in-lalib.at, tests/search-path.at, tests/shlibpath.at, tests/slist.at, tests/standalone.at, tests/static.at, tests/stresstest.at, tests/subproject.at, tests/sysroot.at, tests/tagdemo.at, tests/template.at, tests/testsuite.at, tests/versioning.at, tests/with-pic.at: Replace FSF address in each file's license block with a URL that points to licenses online hosted by GNU.
2024-09-03 23:02:46 +08:00
License along with GNU Libltdl. If not, see <https://www.gnu.org/licenses/>.
1998-11-24 05:26:38 +08:00
*/
1998-11-04 Alexandre Oliva <oliva@dcc.unicamp.br> * ltconfig.in, ltmain.in: updated and fixed the patches below 1998-11-04 Thomas Tanner <tanner@gmx.de> * mdemo/*: added new demo to demonstrate building of dlopenend modules * tests/Makefile.am, tests/mdemo*: added some tests for mdemo 1998-11-04 Gary V. Vaughan <gvaughan@oranda.demon.co.uk> * demo/configure.in: added AC_EXEEXT macro so that the tests can work on cywin32/mingw32 hosts. This requires the current CVS autoconf 1998-11-04 Thomas Tanner <tanner@gmx.de> * ltmain.in: New flag -export-symbols; new dlpreopen system * demo/dlmain.c: removed dld_preloaded_symbol_count 1998-11-04 Ian Lance Taylor <ian@cygnus.com> * ltmain.in: On installation, don't get confused if the same name appears more than once in the list of library names. 1998-11-04 Ian Lance Taylor <ian@cygnus.com> * ltconfig.in: Add objext and libext variables. Check for object suffix. Check for mingw32* as well as cygwin32*. Use objext when testing compiler. Add support for Visual C++ on cygwin32 when not using gcc. Add objext, libext, and fix_srcfile_path to generated libtool script. * ltmain.in: Use .${objext} rather than .o. Use fix_srcfile_path if it is set. Check for .obj as well as for .o, and for .lib as well as for .a. Use .${libext} rather than .a when creating old libraries. * libtoolize.in: Change initial /bin/sh to @SHELL@. * libtool.m4 (AM_PROG_LIBTOOL): Add AC_REQUIRE for AC_CANONICAL_BUILD, so that autoconf doesn't get mixed up by the AC_REQUIRE in AC_CHECK_TOOL. 1998-11-04 Ian Lance Taylor <ian@cygnus.com> * ltconfig.in: Look in the right directory for libtool.c in archive_cmds for cygwin32. 1998-11-04 Ian Lance Taylor <ian@cygnus.com> * ltconfig.in: Fix cygwin32 support to avoid using a double extension, to delete the def file, to set version_type to windows, and to include versuffix in the DLL name. * ltmain.in: Add support for a version_type of windows. 1998-11-04 Ian Lance Taylor <ian@cygnus.com> * ltconfig.in: Add cygwin32 support. * libtool.m4 (AM_PROG_LIBTOOL): Call AM_SYS_LIBTOOL_CYGWIN32 on a cygwin32 host. Pass DLLTOOL and AS to ltconfig. (AM_SYS_LIBTOOL_CYGWIN32): New macro.
1998-11-04 17:43:29 +08:00
/* Only include this header file once. */
#if !defined LTDL_H
#define LTDL_H 1
Keywords: There was no clean separation of abstraction layers in libltdl. The first step in fixing this is to factor out the memory management abstraction, making a start on removing promiscuity from the underlying portability layer: * doc/libtool.texi (Libltdl interface): Remove lt_dlmalloc, lt_dlrealloc and lt_dlfree references. The memory management layer used by libltdl is now private. * libltdl/lt_system.h: New installed header for system portability abstraction. * libltdl/ltdl.h: Use it. * libltdl/lt__alloc.c, libltdl/lt__alloc.h: New module above system portability layer to abstract ltdl's memory management. * libltdl/ltdl.c: Use lt__alloc.h. (closedir): Use free. (opendir): Use malloc/free. (lt__xalloc_die_callback): Report memory failures through lt_dlerror. (lt_dlinit): Use it to initialise memory management. (LT_DLMALLOC, LT_DLREALLOC, LT_DLFREE, LT_EMALLOC, LT_EREALLOC) (rpl_strdup, rpl_realloc, lt_estrdup, lt_emalloc, lt_erealloc): Removed in favour of... (lt__strdup, lt__memdup, MALLOC, REALLOC, FREE): ...these calls from libltdl/lt__alloc.h. Changed all callers. (rpl_argz_append, rpl_argz_create_sep, rpl_argz_insert): As part of the portability layer, these functions no longer use libltdl memory management API. (free_vars): Factored out. (LT_DLMEM_REASSIGN): While redoing memory handling, renamed... * libltdl/lt__alloc.h (MEMREASSIGN): ...to this. * libltdl/Makefile.am (AUTOMAKE_OPTIONS): Let automake track dependencies automatically. (pkgincludedir): Override from parent package's setting. (pkginclude_HEADERS): Install lt_system.h. (libltdl_la_SOURCES): Add new files. * NEWS: Updated. Reported by Dalibor Topic <robilad@kaffe.org>
2004-04-06 23:42:11 +08:00
#include <libltdl/lt_system.h>
Factor out the mutex handling and error handling into their own modules. Mutex handling is not currently useful in combination with posix threads, and should be easier to replace if it is in a separate module. Additionally, we can factor out the loaders in such a way as to depend on only the portability layer and these new mutex and error modules now: * libltdl/Makefile.am (pkginclude_HEADERS): Install lt_error.h and lt_mutex.h to $includedir/libltdl. (libltdl_la_SOURCES): Build lt_error and lt_mutex objects. * libltdl/ltdl.h (LT_SCOPE): Moved from here... * libltdl/lt_system.h (LT_SCOPE): ...to here. * libltdl/ltdl.c (lt_dlerror_strings, LT_DLSTRERROR): Moved from here... * libltdl/lt__private.h (lt__error_strings, LT__STRERROR): ...to here as additional internal interfaces to lt_error. Changed all callers. * libltdl/ltdl.c (LT_DLMUTEX_LOCK, LT_DLMUTEX_UNLOCK) (LT_DLMUTEX_SETERROR, LT_DLMUTEX_GETERROR, lt_dlmutex_lock_func) (lt_dlmutex_unlock_func, lt_dlmutex_geterror_func) (lt_dllast_error): Moved from here... (LT__MUTEX_LOCK, LT__MUTEX_UNLOCK, LT__MUTEX_SETERRORSTR) (LT__MUTEX_GETERROR, lt__mutex_lock_func, lt__mutex_unlock_func) (lt__mutex_geterror_func, lt__last_error): ...to here as additional internal interfaces to lt_mutex. Changed all callers. (LT_MUTEX_SETERROR): Take an errorcode rather than a string. Changed all callers. * libltdl/ltdl.c, libltdl/ltdl.h (lt_dlmutex_register): Moved from here... * libltdl/lt_mutex.c, libltdl/lt_mutex.h (lt_dlmutex_register): ...to here. New files. * libltdl/ltdl.c, libltdl/ltdl.h (lt_dladderror, lt_dlseterror) (lt_dlerror_table): Moved from here... * libltdl/lt_error.c, libltdl/lt_error.h (lt_dladderror) (lt_dlseterror, lt_dlerror_table): ...to here. New files.
2004-04-13 22:12:00 +08:00
#include <libltdl/lt_error.h>
#include <libltdl/lt_dlloader.h>
1998-11-04 Alexandre Oliva <oliva@dcc.unicamp.br> * ltconfig.in, ltmain.in: updated and fixed the patches below 1998-11-04 Thomas Tanner <tanner@gmx.de> * mdemo/*: added new demo to demonstrate building of dlopenend modules * tests/Makefile.am, tests/mdemo*: added some tests for mdemo 1998-11-04 Gary V. Vaughan <gvaughan@oranda.demon.co.uk> * demo/configure.in: added AC_EXEEXT macro so that the tests can work on cywin32/mingw32 hosts. This requires the current CVS autoconf 1998-11-04 Thomas Tanner <tanner@gmx.de> * ltmain.in: New flag -export-symbols; new dlpreopen system * demo/dlmain.c: removed dld_preloaded_symbol_count 1998-11-04 Ian Lance Taylor <ian@cygnus.com> * ltmain.in: On installation, don't get confused if the same name appears more than once in the list of library names. 1998-11-04 Ian Lance Taylor <ian@cygnus.com> * ltconfig.in: Add objext and libext variables. Check for object suffix. Check for mingw32* as well as cygwin32*. Use objext when testing compiler. Add support for Visual C++ on cygwin32 when not using gcc. Add objext, libext, and fix_srcfile_path to generated libtool script. * ltmain.in: Use .${objext} rather than .o. Use fix_srcfile_path if it is set. Check for .obj as well as for .o, and for .lib as well as for .a. Use .${libext} rather than .a when creating old libraries. * libtoolize.in: Change initial /bin/sh to @SHELL@. * libtool.m4 (AM_PROG_LIBTOOL): Add AC_REQUIRE for AC_CANONICAL_BUILD, so that autoconf doesn't get mixed up by the AC_REQUIRE in AC_CHECK_TOOL. 1998-11-04 Ian Lance Taylor <ian@cygnus.com> * ltconfig.in: Look in the right directory for libtool.c in archive_cmds for cygwin32. 1998-11-04 Ian Lance Taylor <ian@cygnus.com> * ltconfig.in: Fix cygwin32 support to avoid using a double extension, to delete the def file, to set version_type to windows, and to include versuffix in the DLL name. * ltmain.in: Add support for a version_type of windows. 1998-11-04 Ian Lance Taylor <ian@cygnus.com> * ltconfig.in: Add cygwin32 support. * libtool.m4 (AM_PROG_LIBTOOL): Call AM_SYS_LIBTOOL_CYGWIN32 on a cygwin32 host. Pass DLLTOOL and AS to ltconfig. (AM_SYS_LIBTOOL_CYGWIN32): New macro.
1998-11-04 17:43:29 +08:00
LT_BEGIN_C_DECLS
/* LT_STRLEN can be used safely on NULL pointers. */
#define LT_STRLEN(s) (((s) && (s)[0]) ? strlen (s) : 0)
/* --- DYNAMIC MODULE LOADING API --- */
typedef struct lt__handle *lt_dlhandle; /* A loaded module. */
/* Initialisation and finalisation functions for libltdl. */
LT_SCOPE int lt_dlinit (void);
LT_SCOPE int lt_dlexit (void);
/* Module search path manipulation. */
LT_SCOPE int lt_dladdsearchdir (const char *search_dir);
LT_SCOPE int lt_dlinsertsearchdir (const char *before,
const char *search_dir);
LT_SCOPE int lt_dlsetsearchpath (const char *search_path);
LT_SCOPE const char *lt_dlgetsearchpath (void);
LT_SCOPE int lt_dlforeachfile (
const char *search_path,
int (*func) (const char *filename, void *data),
void *data);
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 22:38:50 +08:00
/* User module loading advisors. */
LT_SCOPE int lt_dladvise_init (lt_dladvise *advise);
LT_SCOPE int lt_dladvise_destroy (lt_dladvise *advise);
LT_SCOPE int lt_dladvise_ext (lt_dladvise *advise);
LT_SCOPE int lt_dladvise_resident (lt_dladvise *advise);
LT_SCOPE int lt_dladvise_local (lt_dladvise *advise);
LT_SCOPE int lt_dladvise_global (lt_dladvise *advise);
LT_SCOPE int lt_dladvise_preload (lt_dladvise *advise);
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 22:38:50 +08:00
/* Portable libltdl versions of the system dlopen() API. */
LT_SCOPE lt_dlhandle lt_dlopen (const char *filename);
LT_SCOPE lt_dlhandle lt_dlopenext (const char *filename);
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 22:38:50 +08:00
LT_SCOPE lt_dlhandle lt_dlopenadvise (const char *filename,
lt_dladvise advise);
LT_SCOPE void * lt_dlsym (lt_dlhandle handle, const char *name);
LT_SCOPE const char *lt_dlerror (void);
LT_SCOPE int lt_dlclose (lt_dlhandle handle);
/* --- PRELOADED MODULE SUPPORT --- */
1998-11-04 Alexandre Oliva <oliva@dcc.unicamp.br> * ltconfig.in, ltmain.in: updated and fixed the patches below 1998-11-04 Thomas Tanner <tanner@gmx.de> * mdemo/*: added new demo to demonstrate building of dlopenend modules * tests/Makefile.am, tests/mdemo*: added some tests for mdemo 1998-11-04 Gary V. Vaughan <gvaughan@oranda.demon.co.uk> * demo/configure.in: added AC_EXEEXT macro so that the tests can work on cywin32/mingw32 hosts. This requires the current CVS autoconf 1998-11-04 Thomas Tanner <tanner@gmx.de> * ltmain.in: New flag -export-symbols; new dlpreopen system * demo/dlmain.c: removed dld_preloaded_symbol_count 1998-11-04 Ian Lance Taylor <ian@cygnus.com> * ltmain.in: On installation, don't get confused if the same name appears more than once in the list of library names. 1998-11-04 Ian Lance Taylor <ian@cygnus.com> * ltconfig.in: Add objext and libext variables. Check for object suffix. Check for mingw32* as well as cygwin32*. Use objext when testing compiler. Add support for Visual C++ on cygwin32 when not using gcc. Add objext, libext, and fix_srcfile_path to generated libtool script. * ltmain.in: Use .${objext} rather than .o. Use fix_srcfile_path if it is set. Check for .obj as well as for .o, and for .lib as well as for .a. Use .${libext} rather than .a when creating old libraries. * libtoolize.in: Change initial /bin/sh to @SHELL@. * libtool.m4 (AM_PROG_LIBTOOL): Add AC_REQUIRE for AC_CANONICAL_BUILD, so that autoconf doesn't get mixed up by the AC_REQUIRE in AC_CHECK_TOOL. 1998-11-04 Ian Lance Taylor <ian@cygnus.com> * ltconfig.in: Look in the right directory for libtool.c in archive_cmds for cygwin32. 1998-11-04 Ian Lance Taylor <ian@cygnus.com> * ltconfig.in: Fix cygwin32 support to avoid using a double extension, to delete the def file, to set version_type to windows, and to include versuffix in the DLL name. * ltmain.in: Add support for a version_type of windows. 1998-11-04 Ian Lance Taylor <ian@cygnus.com> * ltconfig.in: Add cygwin32 support. * libtool.m4 (AM_PROG_LIBTOOL): Call AM_SYS_LIBTOOL_CYGWIN32 on a cygwin32 host. Pass DLLTOOL and AS to ltconfig. (AM_SYS_LIBTOOL_CYGWIN32): New macro.
1998-11-04 17:43:29 +08:00
* NEWS: updated. * doc/libtool.texi (Libltdl interface): Moved user defined module loader documentation from here... (Module loaders for libltdl) ...to here, and updated the text and added examples. * ltdl.m4 (AC_CHECK_FUNCS): check strcmp for lt_find_dlloader. * libltdl/ltdl.h: Reformatted and commented for readability. (struct lt_user_dlloader): New data type for passing initialisation pointers to lt_add_dlloader. (LTDL_ERROR_INVALID_LOADER): New error message when non loader handles are passed to the user loader API. (LTDL_ERROR_INIT_LOADER): New error when loader initialisation fails. (LTDL_ERROR_REMOVE_LOADER): New error when loader removal fails. (lt_module_open_t): renamed from lt_lib_open_t. (lt_module_close_t): renamed from lt_lib_close_t. (lt_dlloader_exit_t): renamed from lt_dlloader_exit_t. * libltdl/ltdl.c: Reordered builtin loaders so that the "dld" loader no longer occurs before "dlopen" on some platforms and after it on others. (lt_dlloader_t): Moved here from ltdl.h, added a field, "loader_name", for identifying the loader, and renamed from lt_dltype_t. Renamed type variables to loader IFF of type lt_dlloader_t. (lt_module_t): Renamed from lt_syshandle. Renamed handle variables to module IFF of type lt_module_t. (LTDL_TYPE_TOP): Deleted. No longer required. (sys_dl): Initialised as a struct lt_user_dlloader. (sys_dl_init): Deleted. No longer required. (sys_dl_exit): Ditto. (sys_shl): Initialised as a struct lt_user_dlloader. (sys_shl_init): Deleted. No longer required. (sys_shl_exit): Ditto. (sys_wll): Initialised as a struct lt_user_dlloader. (sys_wll_init): Deleted. No longer required. (sys_wll_exit): Ditto. (sys_bedl): Initialised as a struct lt_user_dlloader. (sys_bedl_init): Deleted. No longer required. (sys_bedl_exit): Ditto. (sys_dld): Initialised as a struct lt_user_dlloader. (sys_dld_init): Deleted. No longer required. (sys_dld_exit): Ditto. (sys_presym): Initialised as a struct lt_user_dlloader. (lt_mod_init_t): Moved to here from ltdl.h. (lt_dlinit): Add builtin loaders using the user loader API. (lt_dlexit): Unregister and free all loaders. (lt_add_dlloader): New function to add a new module loader after the loader specified in the argument. (lt_remove_dlloader): New function to remove a module loader. (lt_next_dlloader): New function for iterating over module loaders. (lt_dlloader_name): Accessor function for name of dlloader. (lt_find_dlloader): New function to get a reference to a registered module loader. (strcmp): static implementation incase the host has none. (lt_dlgettypes, lt_dlsettypes): Removed.
2000-02-03 06:43:14 +08:00
/* A preopened symbol. Arrays of this type comprise the exported
symbols for a dlpreopened module. */
1999-01-13 04:42:47 +08:00
typedef struct {
const char *name;
This pervasive changeset makes two intertwined deep changes to the 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.
2004-07-15 20:14:48 +08:00
void *address;
1999-01-13 04:42:47 +08:00
} lt_dlsymlist;
This pervasive changeset makes two intertwined deep changes to the 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.
2004-07-15 20:14:48 +08:00
typedef int lt_dlpreload_callback_func (lt_dlhandle handle);
LT_SCOPE int lt_dlpreload (const lt_dlsymlist *preloaded);
LT_SCOPE int lt_dlpreload_default (const lt_dlsymlist *preloaded);
This pervasive changeset makes two intertwined deep changes to the 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.
2004-07-15 20:14:48 +08:00
LT_SCOPE int lt_dlpreload_open (const char *originator,
lt_dlpreload_callback_func *func);
This pervasive changeset makes two intertwined deep changes to the 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.
2004-07-15 20:14:48 +08:00
#define lt_preloaded_symbols lt__PROGRAM__LTX_preloaded_symbols
/* Ensure C linkage. */
extern LT_DLSYM_CONST lt_dlsymlist lt__PROGRAM__LTX_preloaded_symbols[];
#define LTDL_SET_PRELOADED_SYMBOLS() \
lt_dlpreload_default(lt_preloaded_symbols)
/* --- MODULE INFORMATION --- */
/* Associating user data with loaded modules. */
typedef void * lt_dlinterface_id;
typedef int lt_dlhandle_interface (lt_dlhandle handle, const char *id_string);
LT_SCOPE lt_dlinterface_id lt_dlinterface_register (const char *id_string,
lt_dlhandle_interface *iface);
LT_SCOPE void lt_dlinterface_free (lt_dlinterface_id key);
LT_SCOPE void * lt_dlcaller_set_data (lt_dlinterface_id key,
lt_dlhandle handle, void *data);
LT_SCOPE void * lt_dlcaller_get_data (lt_dlinterface_id key,
lt_dlhandle handle);
* NEWS: updated. * doc/libtool.texi (Libltdl interface): Moved user defined module loader documentation from here... (Module loaders for libltdl) ...to here, and updated the text and added examples. * ltdl.m4 (AC_CHECK_FUNCS): check strcmp for lt_find_dlloader. * libltdl/ltdl.h: Reformatted and commented for readability. (struct lt_user_dlloader): New data type for passing initialisation pointers to lt_add_dlloader. (LTDL_ERROR_INVALID_LOADER): New error message when non loader handles are passed to the user loader API. (LTDL_ERROR_INIT_LOADER): New error when loader initialisation fails. (LTDL_ERROR_REMOVE_LOADER): New error when loader removal fails. (lt_module_open_t): renamed from lt_lib_open_t. (lt_module_close_t): renamed from lt_lib_close_t. (lt_dlloader_exit_t): renamed from lt_dlloader_exit_t. * libltdl/ltdl.c: Reordered builtin loaders so that the "dld" loader no longer occurs before "dlopen" on some platforms and after it on others. (lt_dlloader_t): Moved here from ltdl.h, added a field, "loader_name", for identifying the loader, and renamed from lt_dltype_t. Renamed type variables to loader IFF of type lt_dlloader_t. (lt_module_t): Renamed from lt_syshandle. Renamed handle variables to module IFF of type lt_module_t. (LTDL_TYPE_TOP): Deleted. No longer required. (sys_dl): Initialised as a struct lt_user_dlloader. (sys_dl_init): Deleted. No longer required. (sys_dl_exit): Ditto. (sys_shl): Initialised as a struct lt_user_dlloader. (sys_shl_init): Deleted. No longer required. (sys_shl_exit): Ditto. (sys_wll): Initialised as a struct lt_user_dlloader. (sys_wll_init): Deleted. No longer required. (sys_wll_exit): Ditto. (sys_bedl): Initialised as a struct lt_user_dlloader. (sys_bedl_init): Deleted. No longer required. (sys_bedl_exit): Ditto. (sys_dld): Initialised as a struct lt_user_dlloader. (sys_dld_init): Deleted. No longer required. (sys_dld_exit): Ditto. (sys_presym): Initialised as a struct lt_user_dlloader. (lt_mod_init_t): Moved to here from ltdl.h. (lt_dlinit): Add builtin loaders using the user loader API. (lt_dlexit): Unregister and free all loaders. (lt_add_dlloader): New function to add a new module loader after the loader specified in the argument. (lt_remove_dlloader): New function to remove a module loader. (lt_next_dlloader): New function for iterating over module loaders. (lt_dlloader_name): Accessor function for name of dlloader. (lt_find_dlloader): New function to get a reference to a registered module loader. (strcmp): static implementation incase the host has none. (lt_dlgettypes, lt_dlsettypes): Removed.
2000-02-03 06:43:14 +08:00
/* Read only information pertaining to a loaded module. */
typedef struct {
char * filename; /* file name */
char * name; /* module name */
int ref_count; /* number of times lt_dlopened minus
* NEWS: updated. * doc/libtool.texi (Libltdl interface): Moved user defined module loader documentation from here... (Module loaders for libltdl) ...to here, and updated the text and added examples. * ltdl.m4 (AC_CHECK_FUNCS): check strcmp for lt_find_dlloader. * libltdl/ltdl.h: Reformatted and commented for readability. (struct lt_user_dlloader): New data type for passing initialisation pointers to lt_add_dlloader. (LTDL_ERROR_INVALID_LOADER): New error message when non loader handles are passed to the user loader API. (LTDL_ERROR_INIT_LOADER): New error when loader initialisation fails. (LTDL_ERROR_REMOVE_LOADER): New error when loader removal fails. (lt_module_open_t): renamed from lt_lib_open_t. (lt_module_close_t): renamed from lt_lib_close_t. (lt_dlloader_exit_t): renamed from lt_dlloader_exit_t. * libltdl/ltdl.c: Reordered builtin loaders so that the "dld" loader no longer occurs before "dlopen" on some platforms and after it on others. (lt_dlloader_t): Moved here from ltdl.h, added a field, "loader_name", for identifying the loader, and renamed from lt_dltype_t. Renamed type variables to loader IFF of type lt_dlloader_t. (lt_module_t): Renamed from lt_syshandle. Renamed handle variables to module IFF of type lt_module_t. (LTDL_TYPE_TOP): Deleted. No longer required. (sys_dl): Initialised as a struct lt_user_dlloader. (sys_dl_init): Deleted. No longer required. (sys_dl_exit): Ditto. (sys_shl): Initialised as a struct lt_user_dlloader. (sys_shl_init): Deleted. No longer required. (sys_shl_exit): Ditto. (sys_wll): Initialised as a struct lt_user_dlloader. (sys_wll_init): Deleted. No longer required. (sys_wll_exit): Ditto. (sys_bedl): Initialised as a struct lt_user_dlloader. (sys_bedl_init): Deleted. No longer required. (sys_bedl_exit): Ditto. (sys_dld): Initialised as a struct lt_user_dlloader. (sys_dld_init): Deleted. No longer required. (sys_dld_exit): Ditto. (sys_presym): Initialised as a struct lt_user_dlloader. (lt_mod_init_t): Moved to here from ltdl.h. (lt_dlinit): Add builtin loaders using the user loader API. (lt_dlexit): Unregister and free all loaders. (lt_add_dlloader): New function to add a new module loader after the loader specified in the argument. (lt_remove_dlloader): New function to remove a module loader. (lt_next_dlloader): New function for iterating over module loaders. (lt_dlloader_name): Accessor function for name of dlloader. (lt_find_dlloader): New function to get a reference to a registered module loader. (strcmp): static implementation incase the host has none. (lt_dlgettypes, lt_dlsettypes): Removed.
2000-02-03 06:43:14 +08:00
number of times lt_dlclosed. */
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 22:38:50 +08:00
unsigned int is_resident:1; /* module can't be unloaded. */
unsigned int is_symglobal:1; /* module symbols can satisfy
subsequently loaded modules. */
unsigned int is_symlocal:1; /* module symbols are only available
locally. */
} lt_dlinfo;
LT_SCOPE const lt_dlinfo *lt_dlgetinfo (lt_dlhandle handle);
LT_SCOPE lt_dlhandle lt_dlhandle_iterate (lt_dlinterface_id iface,
lt_dlhandle place);
LT_SCOPE lt_dlhandle lt_dlhandle_fetch (lt_dlinterface_id iface,
const char *module_name);
LT_SCOPE int lt_dlhandle_map (lt_dlinterface_id iface,
int (*func) (lt_dlhandle handle, void *data),
void *data);
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 22:38:50 +08:00
/* Deprecated module residency management API. */
LT_SCOPE int lt_dlmakeresident (lt_dlhandle handle);
LT_SCOPE int lt_dlisresident (lt_dlhandle handle);
#define lt_ptr void *
LT_END_C_DECLS
1998-11-04 Alexandre Oliva <oliva@dcc.unicamp.br> * ltconfig.in, ltmain.in: updated and fixed the patches below 1998-11-04 Thomas Tanner <tanner@gmx.de> * mdemo/*: added new demo to demonstrate building of dlopenend modules * tests/Makefile.am, tests/mdemo*: added some tests for mdemo 1998-11-04 Gary V. Vaughan <gvaughan@oranda.demon.co.uk> * demo/configure.in: added AC_EXEEXT macro so that the tests can work on cywin32/mingw32 hosts. This requires the current CVS autoconf 1998-11-04 Thomas Tanner <tanner@gmx.de> * ltmain.in: New flag -export-symbols; new dlpreopen system * demo/dlmain.c: removed dld_preloaded_symbol_count 1998-11-04 Ian Lance Taylor <ian@cygnus.com> * ltmain.in: On installation, don't get confused if the same name appears more than once in the list of library names. 1998-11-04 Ian Lance Taylor <ian@cygnus.com> * ltconfig.in: Add objext and libext variables. Check for object suffix. Check for mingw32* as well as cygwin32*. Use objext when testing compiler. Add support for Visual C++ on cygwin32 when not using gcc. Add objext, libext, and fix_srcfile_path to generated libtool script. * ltmain.in: Use .${objext} rather than .o. Use fix_srcfile_path if it is set. Check for .obj as well as for .o, and for .lib as well as for .a. Use .${libext} rather than .a when creating old libraries. * libtoolize.in: Change initial /bin/sh to @SHELL@. * libtool.m4 (AM_PROG_LIBTOOL): Add AC_REQUIRE for AC_CANONICAL_BUILD, so that autoconf doesn't get mixed up by the AC_REQUIRE in AC_CHECK_TOOL. 1998-11-04 Ian Lance Taylor <ian@cygnus.com> * ltconfig.in: Look in the right directory for libtool.c in archive_cmds for cygwin32. 1998-11-04 Ian Lance Taylor <ian@cygnus.com> * ltconfig.in: Fix cygwin32 support to avoid using a double extension, to delete the def file, to set version_type to windows, and to include versuffix in the DLL name. * ltmain.in: Add support for a version_type of windows. 1998-11-04 Ian Lance Taylor <ian@cygnus.com> * ltconfig.in: Add cygwin32 support. * libtool.m4 (AM_PROG_LIBTOOL): Call AM_SYS_LIBTOOL_CYGWIN32 on a cygwin32 host. Pass DLLTOOL and AS to ltconfig. (AM_SYS_LIBTOOL_CYGWIN32): New macro.
1998-11-04 17:43:29 +08:00
#endif /*!defined LTDL_H*/