delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2000/02/25/19:07:19

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT sourceware DOT cygnus DOT com>
List-Archive: <http://sourceware.cygnus.com/ml/cygwin/>
List-Post: <mailto:cygwin AT sourceware DOT cygnus DOT com>
List-Help: <mailto:cygwin-help AT sourceware DOT cygnus DOT com>, <http://sourceware.cygnus.com/ml/#faqs>
Sender: cygwin-owner AT sourceware DOT cygnus DOT com
Delivered-To: mailing list cygwin AT sourceware DOT cygnus DOT com
Message-Id: <200002260014.SAA16020@hp2.xraylith.wisc.edu>
To: Peter Dufault <dufault AT hda DOT com>
cc: cygwin AT sourceware DOT cygnus DOT com
Subject: Re: Help redifining the LD make production
In-reply-to: Your message of "Thu, 24 Feb 2000 15:51:12 EST."
<200002242051 DOT PAA01850 AT hda DOT hda DOT com>
Date: Fri, 25 Feb 2000 18:14:39 -0600
From: Mumit Khan <khan AT NanoTech DOT Wisc DOT EDU>

Peter Dufault <dufault AT hda DOT com> writes:
> I need help redefining the LD make production for the native CYGWIN
> tools so that they will work "properly" under WINE (which needs relocable
> exe's).  I've figured out that this unfortunate script will do what I want:

[ script elided ]

> However, I can't figure out the "right way to do it", that is,
> I can't figure out where I change one or two things and have this
> sort of script (it doesn't have to be this, and I know it might have
> something to do with "dllwrap") apply across the board.

If this works, this is the right way ;-) 

The current released version of binutils creates relocatable DLLs using
two ways, which are really equivalent:

1. Multiple ld/dlltool passes: This has the obvious drawback that it
requires significant knowledge of what needs to be done (starting from
DEF files to specifying the *correct* entry point).

2. dllwrap: this is a hack that I added that automates (1) and alleviates
a lot of the pain. 

The new upcoming binutils[1] will use the new pe-dll code that works like
VC++ and Unix linkers and will create DLLs in one pass.
  
  $ gcc -shared -o foo.dll -Wl,--out-implib,libfoo.a foo.def $OBJS $LIBS

[1] The pre-release version can be downloaded from:
ftp://ftp.xraylith.wisc.edu/pub/khan/gnu-win32/cygwin/snapshots/gcc-2.95.2-1/
slated to become part of upcoming Cygwin net release.

Please see:

http://www.xraylith.wisc.edu/~khan/software/gnu-win32/ for more info
on building DLLs. It talks about methods 1 and 2 in some detail.

Regards,
Mumit


--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019