]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
Backported from branch-2-0:
authorCharles Wilson <libtool@cwilson.fastmail.fm>
Thu, 3 Feb 2005 15:01:21 +0000 (15:01 +0000)
committerRalf Wildenhues <Ralf.Wildenhues@gmx.de>
Thu, 3 Feb 2005 15:01:21 +0000 (15:01 +0000)
* 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

ChangeLog
libtool.m4
ltmain.in

index 2f916e24bb2942291cd74408272c514b9273695f..3ad37a7432144c6ebcfe87d915c8d8635bbb97ea 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2004-09-21  Charles Wilson  <cwilson@spam.protected>
+
+       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  <peter@pogma.com>
 
        * README: Update.
index 61d07836fd0d5a166f4f38441f16d149524dbca6..6cf99729f4fa858d95d1ce9d9ad6c71a5b953b41 100644 (file)
@@ -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'
index 594f4c5ba75953542f200b90252a6211d84ced35..463bd62ead805369d569f778d3b5b97172d13980 100644 (file)
--- 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;
 }