Coder Social home page Coder Social logo

Comments (5)

deliciouslytyped avatar deliciouslytyped commented on July 18, 2024

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.

rui314 avatar rui314 commented on July 18, 2024

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.

matu3ba avatar matu3ba commented on July 18, 2024

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.

deliciouslytyped avatar deliciouslytyped commented on July 18, 2024

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.

rui314 avatar rui314 commented on July 18, 2024

I think this item is not actionable, so closing this issue.

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.