Comments (4)
@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.
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.
@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.
from mold.
Related Issues (20)
- [Question] Is `mold` any compatible at all with wine-tkg (and anything Wine related) to build? HOT 2
- Binaries linked with mold-2.30.0 randomly either work or crash in `_dl_relocate_object` HOT 4
- Fold sold back into mold? HOT 1
- arm-arm_abs-error failed: sorry, unimplemented: Thumb-1 'hard-float' VFP ABI HOT 3
- `mold 2.31.0` build failure when targeting `ARMv6` HOT 3
- retain, used and perhaps wildcard-matching using retain-symbols-file HOT 13
- Missing -z option rodynamic HOT 1
- riscv64-shared-abs-sym fails with 2.31.0 HOT 2
- Statically linked binaries crash with illegal hardware instructions HOT 7
- Cannot build project using tealr and Mold linker HOT 2
- `mold/third-party/mimalloc` can be bumped to `v2.1.6`
- Dependency file has references to temporary file HOT 8
- mold: fatal: unknown command line option: -arch HOT 1
- ninja error "FindFirstFileExA" during build on windows with vs2022 HOT 1
- Error with `cargo build --release` on PPC64LE: Missing `R_PPC64_TPREL16_LO_DS` HOT 2
- Is -z x86-64-vX supported? HOT 2
- Fails to build LLVM 18.1.6 with mold HOT 3
- Corrupts the `DWARF` section when relocating multiple objects into a single one HOT 3
- Feature request: Warn about reverse or cyclic dependencies
- MSYS2/UCRT64: LINKER_TYPE 'MOLD' is unknown or not supported by this toolchain. HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mold.