I worked to create a linker (for an existing compiler/linker) from scratch that produced graphs diagrams and other kinds of visual output about the code being linked.
A single person proved to be not enough for doing all that in one week, regardless here's the result. It outputs information about the linking file and almost any important number it uses.
The main idea is to be more transparent to the user, and stop being a black box.
While working on this I discovered that some file format and specifications used in this process (linking) are pretty well documented, like the COFF/PE file format, but at the same time others are pretty much obscure like PDBs. A new goal is to create open and well documented containers for all the information generated from this tools, to help develop programs like dumpers, debuggers and analyzers.
Corsac is an ongoing project and I hope to have a useful program in the near future.
Is the code for this available ? I would be interested in understanding what exactly the linker has to do to generate an executable.
Thanks!
I plan on continuing and develop it into a full real world linker.
Regarding porting it to Linux, the platform specific code is already separated from the "linker logic" so porting it should be trivial. I expect it to work soon on Linux and Essence. The only roadblock I can think of is file formats, right now it can only accept win64/COFF files as inputs and pe64/COFF as output.