Optlink is on github

Walter Bright newshound2 at digitalmars.com
Thu Mar 7 12:01:57 PST 2013


On 3/7/2013 11:32 AM, Andrej Mitrovic wrote:
> On Thursday, 7 March 2013 at 19:26:49 UTC, Walter Bright wrote:
>>> If anyone is interested I'll put it up on github.
>>
>> There's much more to making a linker. There's the debug info (which you
>> mentioned), then there are the resource files, the module definition files,
>> and lastly the myriad of rather complex switches that are expected. Almost
>> none of that is tested by the dmd test suite.
>
> Nevertheless having a linker written in D goes hand-in-hand with having a
> compiler written in D. I'd be interested in seeing his work. I'd also be
> interested in having something that's documented and that isn't bound by
> licensing issues.
>
> We also have the abandoned DDL[1] project which had a linker that supports OMF,
> and Eric Anderton was nice enough to document his process of implementing it:
> http://www.dsource.org/forums/viewtopic.php?t=959
>
> [1] http://dsource.org/projects/ddl/

Sure, having a complete linker written in D would be preferable. I also began a 
project to write such. However, getting such to be a complete, viable 
replacement for optlink will require a determined, sustained effort.

I also believe that even if Optlink were completely converted to C, it will 
still be intractably difficult to refactor it to do things like support other 
object file formats. This is why I had started a new linker project.

However, Optlink does bring considerable value to any linker replacement 
project, in that embedded in it is an enormous amount of lore about all those 
twinkie little things that matter, and how things really need to work.

And, of course, consider that we don't have a thorough test suite for a linker. 
This is a serious problem. Trying to make symbolic debug info work without such 
is a big issue. Heck, I spent quite a bit of time getting dmd to generate 
correct CV8 info, given that what MS's debugger accepts does not always match 
the (sparse and confusing) documentation.

What we *can* do with Optlink is fix the occasional bug that crops up in it.


More information about the Digitalmars-d mailing list