From: Charles Wilson Date: Thu, 3 Feb 2005 15:01:21 +0000 (+0000) Subject: Backported from branch-2-0: X-Git-Tag: release-1-5-12~7 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=f1b6c94d0518210e27d1b8ec48e287130887a261;p=thirdparty%2Flibtool.git Backported from branch-2-0: * ltmain.in (func_generate_dlsyms): addresses in _preloaded_symbols[] cannot go into .rdata section if symbols are DATA imported from DLL, on windows, because runtime relocations must happen. * libtool.m4 (AC_LIBTOOL_PROG_LD_SHLIBS): build exports for symbols in .rdata sections --- diff --git a/ChangeLog b/ChangeLog index 2f916e24b..3ad37a743 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2004-09-21 Charles Wilson + + Backported from branch-2-0: + * ltmain.in (func_generate_dlsyms): addresses + in _preloaded_symbols[] cannot go into .rdata section + if symbols are DATA imported from DLL, on windows, + because runtime relocations must happen. + * libtool.m4 (AC_LIBTOOL_PROG_LD_SHLIBS): + build exports for symbols in .rdata sections + 2005-02-03 Peter O'Gorman * README: Update. diff --git a/libtool.m4 b/libtool.m4 index 61d07836f..6cf99729f 100644 --- a/libtool.m4 +++ b/libtool.m4 @@ -5094,7 +5094,7 @@ ifelse([$1],[CXX],[ _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" ;; cygwin* | mingw*) - _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGS]] /s/.* \([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols' + _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]] /s/.* \([[^ ]]*\)/\1 DATA/;/^.* __nm__/s/^.* __nm__\([[^ ]]*\) [[^ ]]*/\1 DATA/;/^I /d;/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols' ;; *) _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' @@ -5207,7 +5207,7 @@ EOF _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_AC_TAGVAR(always_export_symbols, $1)=no _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes - _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGS]] /s/.* \([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols' + _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]] /s/.* \([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols' if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' diff --git a/ltmain.in b/ltmain.in index 594f4c5ba..463bd62ea 100644 --- a/ltmain.in +++ b/ltmain.in @@ -4421,7 +4421,26 @@ extern \"C\" { #endif /* The mapping between symbol names and symbols. */ +" + + case $host in + *cygwin* | *mingw* ) + $echo >> "$output_objdir/$dlsyms" "\ +/* DATA imports from DLLs on WIN32 can't be const, because + runtime relocations are performed -- see ld's documentation + on pseudo-relocs */ +struct { +" + ;; + * ) + $echo >> "$output_objdir/$dlsyms" "\ const struct { +" + ;; + esac + + + $echo >> "$output_objdir/$dlsyms" "\ const char *name; lt_ptr address; }