]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
* config/ltmain.in (func_generate_dlsyms): Addresses in
authorCharles Wilson <libtool@cwilson.fastmail.fm>
Wed, 22 Sep 2004 07:40:25 +0000 (07:40 +0000)
committerGary V. Vaughan <gary@gnu.org>
Wed, 22 Sep 2004 07:40:25 +0000 (07:40 +0000)
_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.

ChangeLog
config/ltmain.in
m4/libtool.m4

index 0fc6d74e3253f1836ea458b0fde8fe867bcd9986..f53034b0acc85e71c106374d26ddbf8099bd4bdf 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2004-09-22  Charles Wilson  <cwilson@spam.protected>
+
+       * 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  <gary@gnu.org>
 
        The checks in assign.test are trying to catch case of this ilk:
index 84c016047d126762ba16f08ef814dc2306892b3d..6566c7258ab2951e655f66b19800ebdcad831b49 100644 (file)
@@ -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;
 }
index 77acf9a79258517155766dbe8275cbfc1dd787fa..b5f1232da3fe8f350d7f020416ea197fd29f25fe 100644 (file)
@@ -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'