mirror of
git://git.savannah.gnu.org/libtool.git
synced 2024-11-27 06:09:57 +08:00
* ltmain.in (func_generate_dlsyms) [cygwin, mingw]: when creating
a .exp file for an executable, also create a .def file, and add that file to the link command via SYMFILES. This causes binutils to generate an .edata section, and allows self dlopening to work. * NEWS: Updated.
This commit is contained in:
parent
8bf60ee1c8
commit
8c7eb9e5c9
@ -1,5 +1,11 @@
|
||||
2004-09-22 Charles Wilson <cwilson@spam.protected>
|
||||
|
||||
* ltmain.in (func_generate_dlsyms) [cygwin, mingw]: when creating
|
||||
a .exp file for an executable, also create a .def file, and add
|
||||
that file to the link command via SYMFILES. This causes binutils
|
||||
to generate an .edata section, and allows self dlopening to work.
|
||||
* NEWS: Updated.
|
||||
|
||||
* m4/libtool.m4 (_LT_SYS_DYNAMIC_LINKER): better quoting for
|
||||
postinstall_cmds and postuninstall_cmds to allow spaces in install
|
||||
paths.
|
||||
|
1
NEWS
1
NEWS
@ -17,6 +17,7 @@ New in 1.9d: 2004-??-??; CVS version 1.9c, Libtool team:
|
||||
types have been exchanged. See libltdl/slist.c for documentation.
|
||||
* libltdl is C89 compatible again. lt_dlsymbol type removed, and lt_dlsymlist
|
||||
structure changed to avoid using C99 flexible arrays.
|
||||
* Support self dlopening for executables on cygwin and mingw.
|
||||
* Improved support for linux-gnu/ia64.
|
||||
* Fixed some memory leaks in libltdl.
|
||||
|
||||
|
@ -1019,8 +1019,18 @@ extern \"C\" {
|
||||
export_symbols="$output_objdir/$output.exp"
|
||||
$run $RM $export_symbols
|
||||
$run eval "${SED} -n -e '/^: @PROGRAM@$/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"'
|
||||
case $host in
|
||||
*cygwin* | *mingw* )
|
||||
$run eval "${SED} -e '1iEXPORTS'"' < "$export_symbols" > "$output_objdir/$output.def"'
|
||||
;;
|
||||
esac
|
||||
else
|
||||
$run eval "${SED} -e 's/\([][.*^$]\)/\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$output.exp"'
|
||||
case $host in
|
||||
*cygwin | *mingw* )
|
||||
$run eval "${SED} -e '1iEXPORTS'"' < "$output_objdir/$output.exp" > "$output_objdir/$output.def"'
|
||||
;;
|
||||
esac
|
||||
$run eval '$GREP -f "$output_objdir/$output.exp" < "$nlist" > "$nlist"T'
|
||||
$run eval '$MV "$nlist"T "$nlist"'
|
||||
fi
|
||||
@ -1142,8 +1152,21 @@ static const void *lt_preloaded_setup() {
|
||||
|
||||
# Transform the symbol file into the correct name.
|
||||
symfileobj="$output_objdir/${my_outputname}S.$objext"
|
||||
compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"`
|
||||
finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"`
|
||||
case $host in
|
||||
*cygwin* | *mingw* )
|
||||
if test -f "$output_objdir/$my_outputname.def"; then
|
||||
compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"`
|
||||
finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"`
|
||||
else
|
||||
compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"`
|
||||
finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"`
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"`
|
||||
finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"`
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
*)
|
||||
func_fatal_error "unknown suffix for \`$my_dlsyms'"
|
||||
@ -5828,8 +5851,10 @@ EOF
|
||||
esac
|
||||
case $host in
|
||||
*cygwin* | *mingw* )
|
||||
cwrappersource=`$echo ${objdir}/lt-${output}.c`
|
||||
cwrapper=`$echo ${output}.exe`
|
||||
output_name=`basename $output`
|
||||
output_path=`dirname $output`
|
||||
cwrappersource=`$echo "$output_path/$objdir/lt-$output_name.c"`
|
||||
cwrapper=`$echo "$output_path/$output_name.exe"`
|
||||
$RM $cwrappersource $cwrapper
|
||||
trap "$RM $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user