Comments (5)
Assuming something like the configuration staging in #4 were to be implemented, at the least this would allow deeper inspection of the linker configuration state?
I suppose that's largely unrelated but you've already mentioned pre-caching other files.
from mold.
Debugging a linker is indeed hard, and I don't have a good idea to improve it significantly. In the early stage of development of mold, I added --print-map option to dump the layout of an output file, which was helpful sometimes. But most of the cases, buts are in a subtle feature or a lack thereof, and it often surfaces as a mysterious crash before the control reaches main
. I don't know how to debug that kind of issues efficiently.
from mold.
FYI: You can take a look how https://github.com/kubkon/zig-snapshots and the compiler does it. Not sure, if ~1.5k LOC are worth it.
I don't know how to debug that kind of issues efficiently.
Often printf logging with printf-functions of the state is the best option, since debugging-based tracing does not exist due to debugger ecosystems being incomplete and/or slow. So unfortunately one cant just tell gdb/lldb with a python function to "ftrace the function arguments".
from mold.
in the meantime, at least on NixOS, generally during packaging work, most of my linking issues are system integration related, and running ld
in verbose mode:
- dumps the linker script currently being run,
- lists the paths searched for libraries
Inspecting the path dump tends to solve a large portion of my problems.
This is, of course, a large but limited subset of issues.
from mold.
I think this item is not actionable, so closing this issue.
from mold.
Related Issues (20)
- 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
- Build mold from source with -march or -mcpu in the build script HOT 2
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.