From: Thomas Tanner Date: Thu, 18 Feb 1999 11:38:36 +0000 (+0000) Subject: * TODO: updated X-Git-Tag: release-1-2f~121 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=01e414be0d136c6b57f5e9c5bb71f8711f02c360;p=thirdparty%2Flibtool.git * TODO: updated * autogen: only libltdl needs autoheader * doc/libtool.texi (link mode): documented -export-symbols-regex and updated -export-symbols * doc/libtool.texi (script contents): documented always_export_symbols, export_symbols_cmd, exclude_expsyms, include_expsyms, dlopen and dlopen_self more detailed description of need_lib_prefix * ltconfig.in: a "'" was missing in the default value of export_symbols_cmd * ltmain.in: implemented -export-symbols-regex --- diff --git a/ChangeLog b/ChangeLog index 53f6911d6..ab406acd5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,17 @@ +1999-02-18 Thomas Tanner + + * TODO: updated + * autogen: only libltdl needs autoheader + * doc/libtool.texi (link mode): documented -export-symbols-regex + and updated -export-symbols + * doc/libtool.texi (script contents): documented + always_export_symbols, export_symbols_cmd, exclude_expsyms, + include_expsyms, dlopen and dlopen_self + more detailed description of need_lib_prefix + * ltconfig.in: a "'" was missing in the default value + of export_symbols_cmd + * ltmain.in: implemented -export-symbols-regex + 1999-02-17 Alexandre Oliva * ltconfig.in: (freebsd2*, sunos4*, exclude_expsyms): exclude diff --git a/TODO b/TODO index 763f59137..59a902a2b 100644 --- a/TODO +++ b/TODO @@ -35,6 +35,7 @@ this in the dso.5 page, this looks more informative :) * Inter-library dependencies should be fully tracked by libtool. Reminded by Alexandre Oliva. This requires looking up installed libtool libraries for transparent support. +Thomas Tanner has a patch for this. * Inter-library dependencies need to work for ltlibraries too. Thomas Tanner has a patch for this. @@ -42,6 +43,7 @@ Thomas Tanner has a patch for this. * Alexandre Oliva suggests that we hardcode paths into libraries, as well as binaries: `... -Wl,-soname -Wl,/tmp/libtest.so.0 ...'. Tim Mooney wants the same thing. +Thomas Tanner has a patch for this. * Tom Lane adds that HP-UX's linker, at least (I've also found this on AIX 4), distinguishes between global function and global variable @@ -58,6 +60,9 @@ work under Solaris however. - libltdl documentation needs to be completed. +- AC_PROG_LIBTOOL, AC_ENABLE/DISABLE_SHARED/STATIC, AC_LIBTOOL_DLOPEN + are not documented. + In the future: ************** diff --git a/autogen b/autogen index aebb562c7..2a35dcac5 100644 --- a/autogen +++ b/autogen @@ -19,7 +19,7 @@ for sub in demo depdemo libltdl mdemo cdemo; do rm -f acinclude.m4 cp ../libtool.m4 acinclude.m4 aclocal - autoheader + test "$sub" = libltdl && autoheader automake --gnits --add-missing autoconf cd .. diff --git a/doc/libtool.texi b/doc/libtool.texi index 3ebd3a70a..ec6125738 100644 --- a/doc/libtool.texi +++ b/doc/libtool.texi @@ -1163,8 +1163,12 @@ Allow symbols from @var{output-file} to be resolved with @code{dlsym} @item -export-symbols @var{symfile} Tells the linker to export only the symbols listed in @var{symfile}. The symbol file should end in @samp{.sym} and must contain the name of one -symbol per line. This option does not work for modules and is not -supported on all platforms. +symbol per line. This option has no effect on some platforms. +By default all symbols are exported. + +@item -export-symbols-regex @var{regex} +Same as @samp{-export-symbols}, except that only symbols matching +the regular expression @var{regex} are exported. By default all symbols are exported. @item -L@var{libdir} @@ -3376,6 +3380,12 @@ is no way to generate a shared library with references to symbols that aren't defined in that library. @end defvar +@defvar always_export_symbols +Whether libtool should automatically generate a list of exported symbols +using @var{export_symbols_cmd} before linking an archive. +Set to @samp{yes} or @samp{no}. Default is @samp{no} +@end defvar + @defvar archive_cmds @defvarx archive_expsym_cmds @defvarx old_archive_cmds @@ -3411,16 +3421,35 @@ i.e whether object files do not have to have the suffix ".o". Set to @samp{yes} or @samp{no}. @end defvar +@defvar dlopen +Whether @code{dlopen} is supported on the platform. +Set to @samp{yes} or @samp{no}. +@end defvar + +@defvar dlopen_self +Whether it is possible to @code{dlopen} the executable itself. +Set to @samp{yes} or @samp{no}. +@end defvar + @defvar echo An @code{echo} program which does not interpret backslashes as an escape character. @end defvar +@defvar exclude_expsyms +List of symbols that should not be listed in the preloaded symbols. +@end defvar + @defvar export_dynamic_flag_spec Compiler link flag that allows a dlopened shared library to reference symbols that are defined in the program. @end defvar +@defvar export_symbols_cmd +Command to extract exported symbols from @var{libobjs} to the +file @var{export_symbols}. +@end defvar + @defvar finish_cmds Commands to tell the dynamic linker how to find shared libraries in a specific directory. @@ -3491,6 +3520,10 @@ For information purposes, set to the specified and canonical names of the system that libtool was configured for. @end defvar +@defvar include_expsyms +List of symbols that must always be exported when using @var{export_symbols}. +@end defvar + @defvar libext The standard old archive suffix (normally "a"). @end defvar @@ -3517,6 +3550,9 @@ Whether libtool should automatically prefix module names with 'lib'. Set to @samp{yes} or @samp{no}. By default, it is @samp{unknown}, which means the same as @samp{yes}, but documents that we are not really sure about it. +@samp{yes} means that it is possible both to @code{dlopen} and to +link against a library wihthout 'lib' prefix, +i.e. it requires @var{hardcode_direct} to be @samp{yes}. @end defvar @defvar need_version diff --git a/ltconfig.in b/ltconfig.in index 02d677002..8543456ae 100755 --- a/ltconfig.in +++ b/ltconfig.in @@ -1022,7 +1022,7 @@ hardcode_minus_L=no hardcode_shlibpath_var=unsupported runpath_var= always_export_symbols=no -export_symbols_cmd="$NM $libobjs | $global_symbol_pipe | sed '\''s/.* //'\' | sort | uniq > $export_symbols" +export_symbols_cmd='$NM $libobjs | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols' # include_expsyms should be a list of space-separated symbols to be *always* # included in the symbol list include_expsyms= diff --git a/ltmain.in b/ltmain.in index 0956e12d4..092263265 100644 --- a/ltmain.in +++ b/ltmain.in @@ -672,6 +672,7 @@ compiler." dlprefiles= export_dynamic=no export_symbols= + export_symbols_regex= generated= hardcode_libdirs= finalize_hardcode_libdirs= @@ -741,7 +742,7 @@ compiler." ;; esac ;; - exportsyms) + expsyms) export_symbols="$arg" if test ! -f "$arg"; then $echo "$modename: symbol file \`$arg' does not exist" @@ -750,6 +751,11 @@ compiler." prev= continue ;; + expsyms_regex) + export_symbols_regex="$arg" + prev= + continue + ;; release) release="-$arg" prev= @@ -822,12 +828,16 @@ compiler." fi ;; - -export-symbols) - if test -n "$export_symbols"; then + -export-symbols | -export-symbols-regex) + if test -n "$export_symbols" || test -n "$export_symbols_regex"; then $echo "$modename: cannot have more than one -exported-symbols" exit 1 fi - prev=exportsyms + if test "$arg" = "-export-symbols"; then + prev=expsyms + else + prev=expsyms_regex + fi continue ;; @@ -1859,13 +1869,20 @@ EOF fi # Prepare the list of exported symbols - if test "$always_export_symbols" = yes && test -z "$export_symbols"; then - export_symbols="$objdir/$libname.exp" - $run $rm $export_symbols - $run eval "$export_symbols_cmd" + if test -z "$run" && test -z "$export_symbols"; then + if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then + export_symbols="$objdir/$libname.exp" + $rm $export_symbols + eval cmd=\"$export_symbols_cmd\" + eval "$cmd" + if test -n "$export_symbols_regex"; then + egrep -e "$export_symbols_regex" "$export_symbols" > "$export_symbols"T + $mv "$export_symbols"T "$export_symbols" + fi + fi fi if test -n "$include_expsyms"; then - $run $echo "X$include_expsyms" | $SP2NL >> $export_symbols + $run $echo "X$include_expsyms" | $SP2NL >> "$export_symbols" fi # Do each of the archive commands.