<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META NAME="Generator" CONTENT="MS Exchange Server version 6.0.6249.1">
<TITLE>Re: [PATCH] gcc3/ld patch for direct-linking-to-dll and auto-import support</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/plain format -->
<P><FONT SIZE=2>Hi Ralf,<BR>
<BR>
> while compiling trolltechs qt/xfree library with gcc3 (3.2x) on<BR>
> cygwin I recognized, that the auto-import stuff in combination of<BR>
> recent ld does not work in case of const variables in a dll when<BR>
> using direct linking to a dll, because gcc put those variables into<BR>
> a readonly, that means the .text section.<BR>
><BR>
> The patch and a testcase is appended. A documentation could be found<BR>
> in the patch file.<BR>
<BR>
Are you sure that the current linker does not work ?<BR>
<BR>
When I tried it, using the test case you supplied, but without the<BR>
patch applied, I got this:<BR>
<BR>
% make<BR>
../gcc/g++ -B ../gcc/ -g -save-temps -c -o dll.o dll.cc<BR>
../gcc/g++ -B ../gcc/ -g --shared -L ./i686-pc-cygwin/newlib -L ../i686-pc-cygwin/libstdc++-v3/src/.libs dll.o -o dll.dll<BR>
../gcc/g++ -B ../gcc/ -g -save-temps -c -o client.o client.cc<BR>
../gcc/g++ -B ../gcc/ -g -o client client.o -L ./i686-pc-cygwin/newlib -L ../i686-pc-cygwin/libstdc++-v3/src/.libs -L. -ldll<BR>
Info: resolving _var by linking to __imp__var (auto-import)<BR>
Info: resolving test::var by linking to __imp___ZN4test3varE (auto-import)<BR>
<BR>
Cheers<BR>
Nick<BR>
<BR>
<BR>
<BR>
--<BR>
Unsubscribe info: <A HREF="http://cygwin.com/ml/#unsubscribe-simple">http://cygwin.com/ml/#unsubscribe-simple</A><BR>
Problem reports: <A HREF="http://cygwin.com/problems.html">http://cygwin.com/problems.html</A><BR>
Documentation: <A HREF="http://cygwin.com/docs.html">http://cygwin.com/docs.html</A><BR>
FAQ: <A HREF="http://cygwin.com/faq/">http://cygwin.com/faq/</A><BR>
<BR>
</FONT>
</P>
</BODY>
</HTML>