Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT sources DOT redhat DOT com Delivered-To: mailing list cygwin AT sources DOT redhat DOT com Message-ID: <3977D109.3BE17529@ece.gatech.edu> Date: Fri, 21 Jul 2000 00:26:49 -0400 From: Charles Wilson X-Mailer: Mozilla 4.73 [en] (Windows NT 5.0; U) X-Accept-Language: en MIME-Version: 1.0 To: Danny Smith , cygwin AT sources DOT redhat DOT com Subject: Re: binutils prerelease available for testing (feedback needed) References: <20000720094222 DOT 78726 DOT qmail AT hotmail DOT com> <39771232 DOT 7951D490 AT ece DOT gatech DOT edu> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit I've tried building binutils in three ways: cvs 20000718 cvs 20000718 with the gas/config/obj-coff.c patch reverted cvs 20000721 (after DJ reverted the gas/config.obj-coff.c patch in CVS) I will try using the patch posted to the cygwin list by Mark E. on 2000-7-20 at 19:54 EDT. In all three tested cases, I get the same behavior with libpng, pngtest, *with png_libpng_ver exported as DATA*. -------------------------------- CASE 1: 'USE_GLOBAL_ARRAYS' #define'd -- this forces access to 'png_libpng_ver' to directly refer to a character array, rather than being #defined into an access_function: 'png_get_header_ver()' I can link statically. Executable works fine. CASE 2: 'USE_GLOBAL_ARRAYS' #define'd (dll exports png_libpng_ver as a DATA item) I can link directly to the dll (that is, remove the import lib and the static lib from the search path, *forcing* ld to link with the dll using a virtual, in-memory, generate-on-the-fly import lib. Executable works fine. CASE 3: 'USE_GLOBAL_ARRAYS' #define'd (dll exports png_libpng_ver as a DATA item) I can link using the import lib. Executable stackdumps. CASE 4: 'NO_GLOBAL_ARRAYS' #define'd (causes: #define png_libpng_ver png_get_header_ver(); png_libpng_ver DOES NOT APPEAR anywhere in the dll, importlib, static lib, or executable. I can link statically. Executable works fine. CASE 5: 'NO_GLOBAL_ARRAYS' #define'd. dll contains NO DATA items. I can link directly to the dll. Executable works fine. CASE 6: 'NO_GLOBAL_ARRAYS' #define'd. I can link using the import lib libpng.dll.a. Executable works fine. ---------------------------------- Danny, when you ran your tests, did your DLL export any DATA items? The problem seems to be that the combination of: 'link using an import lib' + 'DATA items exported by dll' doesn't work. None of the proposed fixes helps this problem. (Haven't tested Mark E.'s patch yet) --Chuck Charles Wilson wrote: > > I'll check to see if this eliminates my problems, later tonight. > > --Chuck > > Danny Smith wrote: > > > > Hi > > You may be ahead of me on this but... > > I have experienced similar problems as report by Eric Fifer and Charles > > Wilson using binutils-000718, with access violations linking against C > > dlls with data exports or with C++ dlls. > > > > But, rebuilding binutils-000718 after reverting the changes made to > > gas/config/obj_coff.c > > (http://sources.redhat.com/ml/binutils/2000-07/msg00226.html) back to > > binutils-000717 version, I can successfully build and link against dlls, > > using either dllwrap or gcc -shared. This works also with -mno-cygwin. > > I have tested linking against implib as well as directly aginst dll > > without implib. Both work, for C and C++, and dll data is exported > > correctly. Also with standalone MingW. > > > > Hope this helps. > > > > Regards > > > > -- > > Want to unsubscribe from this list? > > Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com > > -- > Want to unsubscribe from this list? > Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com -- Want to unsubscribe from this list? Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com