bugzilla 424 - Unexpected OPTLINK Termination - solved!

Yigal Chripun yigal100 at gmail.com
Tue Nov 3 14:12:40 PST 2009


On 03/11/2009 20:39, Walter Bright wrote:
> Optlink is written entirely in rather impenetrable assembler code, and
> is resistant to understanding and modification. Hence, over the last few
> months I've been very slowly converting it to C, function by function.
>
> One might ask, why not convert it to D? The answer is that I don't have
> a good test suite for optlink, so I have to be very very careful to not
> make a mistake in the translation. That means do one function at a time,
> rebuild, and retest, which means the compiled C code has to match the
> segment, naming and calling conventions used in optlink. I made a custom
> version of the dmc compiler to do this. Also, C can be made to work
> without any runtime library support at all, and since optlink does not
> use the C runtime library, this is useful.
>
> Once it is in C and working, it will be trivial to translate it to D and
> start rewriting it.
>
> Anyhow, during this process I stumbled upon what the problem was.
> Optlink was apparently trying to account for some Borland obscure
> extension to the OMF. Remove this, and it works, although presumably it
> will no longer link Borland object files (who cares!).
>
> The fix will go out in the next update, if you need it sooner please
> email me.

awesome news! Once Optlink is moved to C and than D, it could grow new 
features like link-time optimizations.


More information about the Digitalmars-d-announce mailing list