Home
Reading
Searching
Subscribe
Sponsors
Statistics
Posting
Contact
Spam
Lists
Links
About
Hosting
Filtering
Features Download
Marketing
Archives
FAQ
Blog
 
Gmane
From: Charles Wilson <cwilso11-Rn4VEauK+AKRv+LV9MX5uipxlwaOVQ5f <at> public.gmane.org>
Subject: Re: Address fixup applied TWICE
Newsgroups: gmane.comp.gnu.mingw.user
Date: Tuesday 4th September 2007 03:21:17 UTC (over 10 years ago)
Danny Smith wrote:
> The reason for this is that the meaning of -Wl,--dll (or -mdll) has
> changed. When dllwrap and this file fragment was written, --dll mean't
> simply to build an executable with appropriate image base for a dll.
> (Do "ld --help | grep dll")  It didn't create a reloc section so that we
> ended up with a non-relocatable dll.   Hence all the crazy dllwrap stuff
> to get a reloc section.
> 
> Then -shared came along  for PE targets,  and sometime later, someone
> decided that --dll should do the same thing as --shared.   I think this
> happened as part of the changes to make relocateble exe files. So now if
> you really want to build a 
> non-relocatable dll, you need to strip the reloc section.  Actually
> there was an Ada bug report about that.  
> 
> 
> I thought I had run into this before
> http://sourceware.org/ml/binutils/2003-07/msg00526.html

Thanks for the explanation.  So, something like the attached (UNTESTED!) 
patch would be appropriate?  All it (attempts) to do is use DLLTOOL to 
generate the .def, and then gcc -shared (once) to make the DLL (I added 
the .def file to DLL_CC_STUFF).

I *think* the entry point specified is the default, so that could 
probably be dropped from DLL_CC_STUFF.  Plus, if this works, it's easy 
enough that the whining in the makefile about dllWRAP can be removed...

--
Chuck
 
CD: 3ms