public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: Charles Wilson <cwilson@ece.gatech.edu>
To: Danny Smith <danny_r_smith@hotmail.com>, cygwin@sources.redhat.com
Subject: Re: binutils prerelease available for testing (feedback needed)
Date: Thu, 20 Jul 2000 21:23:00 -0000	[thread overview]
Message-ID: <3977D109.3BE17529@ece.gatech.edu> (raw)
In-Reply-To: <39771232.7951D490@ece.gatech.edu>

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@sourceware.cygnus.com
> 
> --
> Want to unsubscribe from this list?
> Send a message to cygwin-unsubscribe@sourceware.cygnus.com

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com

  reply	other threads:[~2000-07-20 21:23 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-07-20  2:42 Danny Smith
2000-07-20  7:49 ` Charles Wilson
2000-07-20 21:23   ` Charles Wilson [this message]
2000-07-20 21:54     ` Charles Wilson
  -- strict thread matches above, loose matches on Subject: below --
2000-07-21  5:17 binutils prerelease available for testing (feedback needed)] Fifer, Eric
2000-07-20 23:27 binutils prerelease available for testing (feedback needed) Danny Smith
2000-07-21 10:07 ` Charles Wilson
2000-07-21 12:59   ` Charles Wilson
2000-07-20 19:27 binutils prerelease available for testing (feedback needed)] Danny Smith
2000-07-20 20:41 ` Chris Faylor
     [not found] <39773077.28196.4649D@localhost>
     [not found] ` <200007202340.TAA01399@envy.delorie.com>
2000-07-20 16:54   ` Mark E.
2000-07-20 10:47 binutils prerelease available for testing (feedback needed) Fifer, Eric
2000-07-19  8:33 Fifer, Eric
2000-07-19 11:19 ` Chris Faylor
2000-07-18 16:49 ld -r Unsupported PEI arch pe-i386 Suhaib Siddiqi
2000-07-18 17:01 ` DJ Delorie
2000-07-18 18:34   ` binutils prerelease available for testing (feedback needed) Chris Faylor
2000-07-18 20:35     ` Charles Wilson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3977D109.3BE17529@ece.gatech.edu \
    --to=cwilson@ece.gatech.edu \
    --cc=cygwin@sources.redhat.com \
    --cc=danny_r_smith@hotmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).