From: Charles Wilson Date: Wed, 22 Sep 2004 07:40:25 +0000 (+0000) Subject: * config/ltmain.in (func_generate_dlsyms): Addresses in X-Git-Tag: release-1-9d~39 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1ab797d98db55077de7295f5dc2b609345175227;p=thirdparty%2Flibtool.git * config/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. * m4/libtool.m4 (_LT_LINKER_SHLIBS([TAGNAME])): Build exports for symbols in .rdata sections. --- diff --git a/ChangeLog b/ChangeLog index 0fc6d74e3..f53034b0a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2004-09-22 Charles Wilson + + * config/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. + * m4/libtool.m4 (_LT_LINKER_SHLIBS([TAGNAME])): Build exports for + symbols in .rdata sections. + 2004-09-19 Gary V. Vaughan The checks in assign.test are trying to catch case of this ilk: diff --git a/config/ltmain.in b/config/ltmain.in index 84c016047..6566c7258 100644 --- a/config/ltmain.in +++ b/config/ltmain.in @@ -1064,7 +1064,24 @@ extern \"C\" { $echo >> "$output_objdir/$my_dlsyms" "\ /* The mapping between symbol names and symbols. */ +" + case $host in + *cygwin* | *mingw* ) + $echo >> "$output_objdir/$my_dlsyms" "\ +/* DATA imports from DLLs on WIN32 con't be const, because + runtime relocations are performed -- see ld's documentation + on pseudo-relocs. */ + struct { +" + ;; + *) + $echo >> "$output_objdir/$my_dlsyms" "\ const struct { +" + ;; + esac + + $echo >> "$output_objdir/$my_dlsyms" "\ const char *name; void *address; } diff --git a/m4/libtool.m4 b/m4/libtool.m4 index 77acf9a79..b5f1232da 100644 --- a/m4/libtool.m4 +++ b/m4/libtool.m4 @@ -3414,7 +3414,7 @@ m4_if([$1], [CXX], [ _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" ;; cygwin* | mingw*) - _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGS]] /s/.* \([[^ ]]*\)/\1 DATA/;/^.* __nm__/s/^.* __nm__\([[^ ]]*\) [[^ ]]*/\1 DATA/;/^I /d;/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols' + _LT_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_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' @@ -3530,7 +3530,7 @@ _LT_EOF _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes - _LT_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_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_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'