From d29ebe0d6be90c405ec558e3286f633dbb447a65 Mon Sep 17 00:00:00 2001 From: Alexandre Oliva Date: Thu, 18 Feb 1999 18:50:24 +0000 Subject: [PATCH] * ltconfig.in (archive{,_sym}_commands): Be careful not to re-export the dll entry points DllMain@12, _cygwin_dll_entry@12 and _cygwin_noncygwin_dll_entry@12 to avoid bugs with the wrong entry function being called with inter-dll dependencies. Reported by DJ Delorie * THANKS: Added DJ Delorie, since his code inspired the impgen.c program and because he has patiently answered all of the irritating dll and win32 questions I have fired at him. --- ChangeLog | 9 +++++++++ THANKS | 1 + ltconfig.in | 6 +++--- 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 794137d4..c4fbd893 100644 --- a/ChangeLog +++ b/ChangeLog @@ -6,6 +6,15 @@ 1999-02-18 Gary V. Vaughan + * ltconfig.in (archive{,_sym}_commands): Be careful not to + re-export the dll entry points DllMain@12, _cygwin_dll_entry@12 and + _cygwin_noncygwin_dll_entry@12 to avoid bugs with the wrong entry + function being called with inter-dll dependencies. + Reported by DJ Delorie + * THANKS: Added DJ Delorie, since his code inspired the impgen.c + program and because he has patiently answered all of the + irritating dll and win32 questions I have fired at him. + * ltmain.in (version_type): Oops. Irix versioning implies that major version numbers are 1 based (not zero based). Fixed. diff --git a/THANKS b/THANKS index 99fe19a7..242b0096 100644 --- a/THANKS +++ b/THANKS @@ -15,6 +15,7 @@ Andrey Slepuhin Bruno Haible Carl D. Roth Chris P. Ross +DJ Delorie Edouard G. Parmelan Eric Estievenart Erez Zadok diff --git a/ltconfig.in b/ltconfig.in index d43b4144..dd27465b 100755 --- a/ltconfig.in +++ b/ltconfig.in @@ -1088,7 +1088,7 @@ if test "$with_gnu_ld" = yes; then hardcode_libdir_flag_spec='-L$libdir' allow_undefined_flag=unsupported always_export_symbols=yes - export_symbols_cmd='$DLLTOOL --export-all --output-def $export_symbols $objdir/$soname-ltdll.$objext $libobjs' + export_symbols_cmd='$DLLTOOL --exclude-symbols DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12 --output-def $export_symbols $objdir/$soname-ltdll.$objext $libobjs' archive_expsym_cmds='rm -f $objdir/$soname-ltdll.c~ sed -e "/^# \/\* ltdll.c starts here \*\//,/^# \/\* ltdll.c ends here \*\// { s/^# //; p; }" -e d < $0 > $objdir/$soname-ltdll.c~ @@ -1096,9 +1096,9 @@ if test "$with_gnu_ld" = yes; then echo EXPORTS > $objdir/$soname-def~ cat "$export_symbols" >> $objdir/$soname-def~ $CC -Wl,--base-file,$objdir/$soname-base -Wl,--dll -nostartfiles -Wl,-e,__cygwin_dll_entry@12 -o $lib $objdir/$soname-ltdll.$objext $libobjs $deplibs $linkopts~ - $DLLTOOL --as=$AS --dllname $soname --exclude-symbol=_cygwin_dll_entry@12 --def $objdir/$soname-def --base-file $objdir/$soname-base --output-exp $objdir/$soname-exp~ + $DLLTOOL --as=$AS --dllname $soname --exclude-symbols DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12 --def $objdir/$soname-def --base-file $objdir/$soname-base --output-exp $objdir/$soname-exp~ $CC -Wl,--base-file,$objdir/$soname-base $objdir/$soname-exp -Wl,--dll -nostartfiles -Wl,-e,__cygwin_dll_entry@12 -o $lib $objdir/$soname-ltdll.$objext $libobjs $deplibs $linkopts~ - $DLLTOOL --as=$AS --dllname $soname --exclude-symbol=_cygwin_dll_entry@12 --def $objdir/$soname-def --base-file $objdir/$soname-base --output-exp $objdir/$soname-exp~ + $DLLTOOL --as=$AS --dllname $soname --exclude-symbols DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12 --def $objdir/$soname-def --base-file $objdir/$soname-base --output-exp $objdir/$soname-exp~ $CC $objdir/$soname-exp -Wl,--dll -nostartfiles -Wl,-e,__cygwin_dll_entry@12 -o $lib $objdir/$soname-ltdll.$objext $libobjs $deplibs $linkopts' old_archive_from_new_cmds='$DLLTOOL --as=$AS --dllname $soname --def $objdir/$soname-def --output-lib $objdir/$libname.a'