www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.announce - Experimental win32 OMF linker written in D now on github

reply "Daniel Murphy" <yebbliesnospam gmail.com> writes:
So a couple of years ago I had too much free time and wrote a linker.

It's now on github: https://github.com/yebblies/ylink

Pros:
- Written in D
- Not written in assembly
- Not written before I was born
- Boost license
- Usually produces working executables

Cons:
- No debug information (yet)
- Slower than optlink
- Uses more memory than optlink (cannot run with < 64k of ram)
- Cannot produce DLLs (yet)
- Not really tested

It still needs a lot of work, but it's functional.

Potential uses:
- Replace optlink
- Replace microsoft linker (we could ship this with dmd)
- Call from dmd to do in-memory linking
- Experiment with linker optimizations

Enjoy!
Mar 23 2014
next sibling parent "Alexander Bothe" <info alexanderbothe.com> writes:
On Sunday, 23 March 2014 at 20:33:15 UTC, Daniel Murphy wrote:
 So a couple of years ago I had too much free time and wrote a 
 linker.

 It's now on github: https://github.com/yebblies/ylink

 Pros:
 - Written in D
 - Not written in assembly
 - Not written before I was born
 - Boost license
 - Usually produces working executables

 Cons:
 - No debug information (yet)
 - Slower than optlink
 - Uses more memory than optlink (cannot run with < 64k of ram)
 - Cannot produce DLLs (yet)
 - Not really tested

 It still needs a lot of work, but it's functional.

 Potential uses:
 - Replace optlink
 - Replace microsoft linker (we could ship this with dmd)
 - Call from dmd to do in-memory linking
 - Experiment with linker optimizations

 Enjoy!
If the debug info emitting thing is going to work properly, I'll love to switch to ylink! Finally x64 builds without having to use the ms linker -- awesome! :-)
Mar 24 2014
prev sibling next sibling parent reply Nick Sabalausky <SeeWebsiteToContactMe semitwist.com> writes:
On 3/23/2014 4:33 PM, Daniel Murphy wrote:
 So a couple of years ago I had too much free time and wrote a linker.

 It's now on github: https://github.com/yebblies/ylink
Nifty! I love this Pro:
 - Usually produces working executables
:)
Mar 24 2014
parent reply "Asman01" <jckj33 gmail.com> writes:
On Monday, 24 March 2014 at 22:30:45 UTC, Nick Sabalausky wrote:
 On 3/23/2014 4:33 PM, Daniel Murphy wrote:
 So a couple of years ago I had too much free time and wrote a 
 linker.

 It's now on github: https://github.com/yebblies/ylink
Nifty! I love this Pro:
 - Usually produces working executables
:)
Me too. But not more than ">>Written in D" :)
Mar 24 2014
parent reply "Jack Applegame" <japplegame gmail.com> writes:
On Tuesday, 25 March 2014 at 02:24:39 UTC, Asman01 wrote:
 On Monday, 24 March 2014 at 22:30:45 UTC, Nick Sabalausky wrote:
 On 3/23/2014 4:33 PM, Daniel Murphy wrote:
 So a couple of years ago I had too much free time and wrote a 
 linker.

 It's now on github: https://github.com/yebblies/ylink
Nifty! I love this Pro:
 - Usually produces working executables
:)
Me too. But not more than ">>Written in D" :)
But the best is "Not written before I was born" :)
Mar 24 2014
parent "Steve Teale" <steve.teale britseyeview.com> writes:
On Tuesday, 25 March 2014 at 03:27:07 UTC, Jack Applegame wrote:
 Nifty!

 I love this Pro:

 - Usually produces working executables
:)
Me too. But not more than ">>Written in D" :)
But the best is "Not written before I was born" :)
When I was a lad we had to .... Steve
Mar 26 2014
prev sibling next sibling parent reply "Daniel Murphy" <yebbliesnospam gmail.com> writes:
"Daniel Murphy"  wrote in message news:lgngea$1ccj$1 digitalmars.com...

 So a couple of years ago I had too much free time and wrote a linker.

 It's now on github: https://github.com/yebblies/ylink
Now updated with basic mscoff32 support - although dmd doesn't emit that file format, it does mean you can link the standard import libraries into your normal D applications, instead of having to convert them to omf. Hello world compiled with msvc works, but more complicated (C++) stuff most likely doesn't yet. (comdat aka templates might be buggy, and tls probably doesn't work)
Mar 26 2014
next sibling parent "Rikki Cattermole" <alphaglosined gmail.com> writes:
On Wednesday, 26 March 2014 at 15:33:39 UTC, Daniel Murphy wrote:
 "Daniel Murphy"  wrote in message 
 news:lgngea$1ccj$1 digitalmars.com...

 So a couple of years ago I had too much free time and wrote a 
 linker.

 It's now on github: https://github.com/yebblies/ylink
Now updated with basic mscoff32 support - although dmd doesn't emit that file format, it does mean you can link the standard import libraries into your normal D applications, instead of having to convert them to omf. Hello world compiled with msvc works, but more complicated (C++) stuff most likely doesn't yet. (comdat aka templates might be buggy, and tls probably doesn't work)
Ooo oo yes please :) Maybe one day bye bye Optlink!
Mar 26 2014
prev sibling parent "Colden Cullen" <ColdenCullen gmail.com> writes:
On Wednesday, 26 March 2014 at 15:33:39 UTC, Daniel Murphy wrote:
 Now updated with basic mscoff32 support - although dmd doesn't 
 emit that file format, it does mean you can link the standard 
 import libraries into your normal D applications, instead of 
 having to convert them to omf.
This is a super helpful feature. I can't think of a single library I've used that has provided an OMF library or import library, and converting is a pain in the butt. Thank you thank you thank you for this.
Mar 26 2014
prev sibling parent reply "Jay Norwood" <jayn prismnet.com> writes:
On Sunday, 23 March 2014 at 20:33:15 UTC, Daniel Murphy wrote:
 It still needs a lot of work, but it's functional.
Is there a test suite that you have to pass to declare it fully functional?
Mar 27 2014
parent reply "Daniel Murphy" <yebbliesnospam gmail.com> writes:
"Jay Norwood"  wrote in message news:tsyxasgqmrkmuolmfhxl forum.dlang.org...

 Is there a test suite that you have to pass to declare it fully 
 functional?
Not that I know of, but it _almost_ passes the dmd test suite (3 failures). I'm slowly refactoring it so I can build a comprehensive test suite.
Apr 01 2014
parent reply "asman" <lol.themask gmail.com> writes:
On Wednesday, 2 April 2014 at 04:16:55 UTC, Daniel Murphy wrote:
 "Jay Norwood"  wrote in message 
 news:tsyxasgqmrkmuolmfhxl forum.dlang.org...

 Is there a test suite that you have to pass to declare it 
 fully functional?
Not that I know of, but it _almost_ passes the dmd test suite (3 failures). I'm slowly refactoring it so I can build a comprehensive test suite.
Now which I update I lost all the PDFs in this repo. :(
Apr 09 2014
parent Andrej Mitrovic <andrej.mitrovich gmail.com> writes:
On 4/9/14, asman <lol.themask gmail.com> wrote:
 Now which I update I lost all the PDFs in this repo. :(
Here you go, see the ylink_docs folder: https://github.com/AndrejMitrovic/linker_resources
Apr 09 2014