This is the mail archive of the cygwin@sourceware.cygnus.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Help redifining the LD make production


Peter Dufault <dufault@hda.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@sourceware.cygnus.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]