*** empty log message ***

This commit is contained in:
Thomas Tanner 1999-01-10 14:44:06 +00:00
parent e842493250
commit 662305576a
7 changed files with 35 additions and 47 deletions

View File

@ -1,3 +1,15 @@
1999-01-10 Thomas Tanner <tanner@gmx.de>
* ltmain.in: define dld_preloaded_symbols if at least one of
-export-dynamic, -dlopen or -dlpreopen was specified,
do not include program objects in the symbol list
if -export-dynamic was not enabled
* libltdl/ltdl.c: limit symbols to max. 256 bytes
* mdemo/Makefile.am: build libltdl in a subdirectory,
do not use -export-dynamic for mdemo and mdemo.debug
* tests/mdemo-conf.test,tests/mdemo-make.test,tests/mdemo-inst.test:
do not check for libltdl
1999-01-09 Alexandre Oliva <oliva@dcc.unicamp.br>
* libltdl/ltdl.c (lt_dlopen): missing strlen in bound test

View File

@ -961,7 +961,7 @@ lt_dlclose (handle)
return 0;
}
#define MAX_SYMBOL_LENGTH 128
#define MAX_SYMBOL_LENGTH 256
lt_ptr_t
lt_dlsym (handle, symbol)

View File

@ -1833,7 +1833,7 @@ EOF
finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
fi
if test "$export_dynamic" = yes && test -n "$NM" && test -n "$global_symbol_pipe"; then
if test "$export_dynamic" = yes || test -n "$dlfiles$dlprefiles" && test -n "$NM" && test -n "$global_symbol_pipe"; then
dlsyms="${outputname}S.c"
else
dlsyms=
@ -1843,7 +1843,7 @@ EOF
case "$dlsyms" in
"") ;;
*.c)
if test -z "$export_symbols"; then
if test "$export_dynamic" = yes && test -z "$export_symbols"; then
# Add our own program objects to the preloaded list.
dlprefiles=`$echo "X$objs $dlprefiles" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
fi
@ -1880,7 +1880,7 @@ extern \"C\" {
/* External symbol declarations for the compiler. */\
"
if test -n "$export_symbols"; then
if test "$export_dynamic" = yes && test -n "$export_symbols"; then
sed -e 's/^\(.*\)/\1 \1/' < "$export_symbols" > "$nlist"
fi
@ -1890,7 +1890,7 @@ extern \"C\" {
done
if test -z "$run"; then
# Make sure we at least have an empty file.
# Make sure we have at least an empty file.
test -f "$nlist" || : > "$nlist"
# Try sorting and uniquifying the output.
@ -1925,7 +1925,7 @@ dld_preloaded_symbols[] =
{\
"
if test -n "$export_symbols"; then
if test "$export_dynamic" = yes && test -n "$export_symbols"; then
echo >> "$output_objdir/$dlsyms" "\
{\"${output}\", (lt_ptr_t) 0},"
sed 's/^\(.*\)/ {"\1", (lt_ptr_t) \&\1},/' < "$export_symbols" >> "$output_objdir/$dlsyms"
@ -1967,8 +1967,6 @@ dld_preloaded_symbols[] =
exit 1
;;
esac
elif test "$export_dynamic" != yes; then
test -n "$dlfiles$dlprefiles" && $echo "$modename: warning: \`-dlopen' and \`-dlpreopen' are ignored without \`-export-dynamic'" 1>&2
else
# We keep going just in case the user didn't refer to
# dld_preloaded_symbols. The linker will fail if global_symbol_pipe

View File

@ -6,6 +6,16 @@ INCLUDES = -I$(srcdir)/../libltdl
EXTRA_DIST = acinclude.m4
# A little hack to build libltdl in a subdirectory
libltdl/libltdl.la:
-mkdir $(top_builddir)/libltdl
(here=`pwd` && cd $(top_builddir)/libltdl && \
$$here/../libltdl/configure --srcdir=$$here/../libltdl && \
$(MAKE) all)
distclean-local:
-rm -rf $(top_builddir)/libltdl
lib_LTLIBRARIES = libfoo1.la libfoo2.la
libfoo1_la_SOURCES = foo1.c
@ -20,14 +30,13 @@ bin_PROGRAMS = mdemo mdemo.debug
# Create a version of mdemo that does dlopen.
mdemo_SOURCES = main.c
mdemo_LDADD = ../libltdl/libltdl.la \
mdemo_LDADD = libltdl/libltdl.la \
$(LIBADD_M) # We won't need this when libltdl takes care of dependencies
mdemo_LDFLAGS = -export-dynamic -dlopen libfoo1.la -dlopen libfoo2.la
mdemo_DEPENDENCIES = ../libltdl/libltdl.la libfoo1.la libfoo2.la
mdemo_LDFLAGS = -dlopen libfoo1.la -dlopen libfoo2.la
mdemo_DEPENDENCIES = libltdl/libltdl.la libfoo1.la libfoo2.la
# Create an easier-to-debug version of mdemo.
mdemo_debug_SOURCES = main.c
mdemo_debug_LDADD = ../libltdl/libltdl.la
mdemo_debug_LDFLAGS = -static -export-dynamic \
-dlopen libfoo1.la -dlopen libfoo2.la
mdemo_debug_DEPENDENCIES = ../libltdl/libltdl.la libfoo1.la libfoo2.la
mdemo_debug_LDADD = libltdl/libltdl.la
mdemo_debug_LDFLAGS = -static -dlopen libfoo1.la -dlopen libfoo2.la
mdemo_debug_DEPENDENCIES = libltdl/libltdl.la libfoo1.la libfoo2.la

View File

@ -10,23 +10,6 @@ if test -z "$srcdir"; then
fi
. $srcdir/defs || exit 1
# Maybe we have a VPATH build, in which case, create a new subdir.
test -d ../libltdl || mkdir ../libltdl
# Change to our build directory.
cd ../libltdl || exit 1
# Possibly clean up the distribution.
if test -f Makefile; then
echo "= Running $make distclean in ../libltdl"
$make distclean
fi
rm -f config.cache
# Configure libltdl.
echo "= Configuring in ../libltdl (prefix=$prefix)"
CONFIG_SITE=/dev/null ${CONFIG_SHELL-/bin/sh} $srcdir/../libltdl/configure --srcdir=$srcdir/../libltdl --prefix=$prefix || exit 1
# Maybe we have a VPATH build, in which case, create a new subdir.
test -d ../mdemo || mkdir ../mdemo

View File

@ -17,13 +17,6 @@ else
exit 1
fi
# Check that things are built.
if test -f ../libltdl/libltdl.la; then :
else
echo "You must build libltdl before $0" 1>&2
exit 1
fi
# Change to our build directory.
cd ../mdemo || exit 1

View File

@ -10,19 +10,12 @@ if test -z "$srcdir"; then
fi
. $srcdir/defs || exit 1
if test -f ../libltdl/Makefile && test -f ../mdemo/Makefile; then :
if test -f ../mdemo/Makefile; then :
else
echo "You must run mdemo-conf.test before running $0" 1>&2
exit 1
fi
# Change to our build directory.
cd ../libltdl || exit 1
# Do the actual build.
echo "Making in ../libltdl"
$make || exit 1
# Change to our build directory.
cd ../mdemo || exit 1