crossplatform linking?

Yigal Chripun yigal100 at gmail.com
Mon Mar 23 01:26:48 PDT 2009


Daniel Keep Wrote:

> 
> 
> davidl wrote:
> > 
> > I don't know why there should be different format object files. Couldn't
> > they be much the same. And the linker finally decide how to link them to
> > platform specific binary?
> > 
> > MSVC perhaps has already get some idea of this kind, the link time code
> > generation.
> > 
> > I'm just curious why on the X86 arch , we get different object file
> > formats just for platform specific.
> 
> I would imagine it's because OPTLINK requires OMF, linux wants ELF and
> Mac OSX wants mach-o (or something).
> 
>   -- Daniel

it's not a platform issue but more of a linker issue. after all, mingw uses elf on windows, right?

obj files can be converted between different formats so I guess one can take elf obj files, convert them to omf and feed the result to optlink. it's all a matter of linker implementation and it would be nice to have all of this automated by dmd/optlink



More information about the Digitalmars-d mailing list