How feasible is it to port gold to mingw?

Greatwolf gmane.greatwolf@mamber.net
Mon Dec 6 02:32:00 GMT 2010


"Joseph S. Myers" <joseph@codesourcery.com> wrote in
news:Pine.LNX.4.64.1012051519300.21744@digraph.polyomino.org.uk: 

> 
> What you would need to do is define a way of representing all features
> of Windows binaries in ELF, create configurations of the compiler and 
> assembler that generate ELF, have gold link this form of ELF and then
> have a postlinking tool that converts the final ELF executables and
> shared libraries into PE-COFF binaries that can run directly on
> Windows.  (See the model used for arm-symbianelf, for example; 
> <http://www.martin.st/symbian/> has tools that I think may include one
> implementation of the postlinker.)  There might also be comparatively 
> small and self-contained gold patches to run a postlinker
> automatically after the main ELF linking stage, or you might make GCC
> do that somehow. 
> 
> 
> In-depth technical knowledge of both Windows and ELF ABIs would be
> needed with experience of ABI design and specification work.
> 

Thank you, this is by far the most helpful post so far. I'll investigate 
those suggestions further to see where it leads. I'm perusing the gold 
source atm to familiarize myself with the codebase.

I do have a few other questions though. It's unclear to me at this point 
whether gold produces the final executable (that's written to disk) via 
services provided by binutils or if it does it directly by itself. If 
gold does this by itself, can't I extend the relevant classes that do 
this to handle PE-Coff directly as well? Why would I not want to do this?

Also, would this be the most appropriate place to post future questions 
I'll have regarding this endevor? I didn't get much intial response to my 
post (maybe due to lack of knowledge, interest or both?). What can I do 
to ensure I have a higher chance of getting a helpful response?

Thanks



More information about the Binutils mailing list