Coder Social home page Coder Social logo

Any plans for PE/COFF support? about mold HOT 4 CLOSED

rui314 avatar rui314 commented on July 18, 2024
Any plans for PE/COFF support?

from mold.

Comments (4)

rui314 avatar rui314 commented on July 18, 2024 22

@bencz I know how hard or easy it is to write a linker for Windows from scratch because I did that before. I'm the creator of the LLVM lld linker for Windows. It's not too difficult to write a linker that works 95% of the time, but making a linker that can be used for production isn't an easy task.

from mold.

rui314 avatar rui314 commented on July 18, 2024 8

I hope to add a PE/COFF support to mold, but to be honest there's currently no concrete plan to do that. I strongly believe that I can make a significantly faster linker for Windows just like I did for Unix with lld and mold, but that's going to be another one-person-year project, so I can't promise to do that now.

from mold.

bencz avatar bencz commented on July 18, 2024 1

@santagada
@rui314 I haven't read your project's code yet, but implementing support to generate, for example, MZPE file ( Windows Executable ), is relatively simple, the format appears to be complex, but it's not...
Check this code examples from my repo:
https://github.com/bencz/cc/blob/main/cc.c ( this is a tiny C compiler, that generates a Windows MZ-PE file )
https://github.com/bencz/CoffLib ( a lib. in C# to generate a MZ-PE files too, it is a lib. to help to write compilers for Windows )
https://github.com/bencz/SimpleExeMaker ( a simple program in C++ to generate a MZ-PE file too )

Another point, when you release your book, let us know!

There is a little known book where the writer and developer describes a way to implement a C compiler: https://www.t3x.org/reload/index.html

Another book where the implementation of a C compiler is presented is in the MMURTL book: http://www.ipdatacorp.com/mmurtl/

from mold.

rui314 avatar rui314 commented on July 18, 2024

#190

from mold.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.