Coder Social home page Coder Social logo

Resources / Literature review? about mold HOT 8 OPEN

rui314 avatar rui314 commented on July 18, 2024
Resources / Literature review?

from mold.

Comments (8)

rui314 avatar rui314 commented on July 18, 2024 7

Linker is indeed an area that needs more good documentations. "Linkers & Loaders" gives an overview as to what linker is doing, but it lacks enough details to precisely understand how real Unix linker works. And details matter here, because if you for example forget to implement one feature, it often results in a mysterious crash of a generated executable rather than a friendly error message reported by the loader.

I'm writing a paper about mold, so stay tuned.

I found this is a good read. https://www.repository.cam.ac.uk/bitstream/handle/1810/260771/p607-kell.pdf The paper attempts to formalize the link process. I guess you don't actually want to understand the linker at that level (at least I don't need a formal proof), but still the paper seems a good starting point to understand how actual linker works.

from mold.

MattPD avatar MattPD commented on July 18, 2024 6

FWIW, perhaps some of these may be of use: https://github.com/MattPD/cpplinks/blob/master/executables.linking_loading.md

from mold.

deliciouslytyped avatar deliciouslytyped commented on July 18, 2024

Thanks, that looks good, and some of the references at the end might also help.
I'll look around to see if the paper has any interesting reverse-dependencies later.

from mold.

stefanos82 avatar stefanos82 commented on July 18, 2024

I came here to ask more or less the same question, but you people have answered my question(s), especially @MattPD's link came just in time.

@rui314 Do you have any email I could keep in touch with you? I have some questions that I would like to ask in private, if possible.

from mold.

deliciouslytyped avatar deliciouslytyped commented on July 18, 2024

This is exactly why I asked this publicly, and oh wow @MattPD . Super cool when people keep bibliographies. Maybe rui will find a key paper one week before needing to publish the thesis. :P

from mold.

stefanos82 avatar stefanos82 commented on July 18, 2024

@rui314 regards to the use of fork, I have read an article you might be interested in studying it https://www.microsoft.com/en-us/research/uploads/prod/2019/04/fork-hotos19.pdf

It basically suggests to deprecate fork and choose either posix_spawn() on any POSIX-compliant operating system or CreateProcess() on Windows.

from mold.

rui314 avatar rui314 commented on July 18, 2024

@stefanos82 Here is my email: [email protected]

As to fork, my linker does not depend on it too much. If necessary, mold can spawn itself as a child process instead of forking. I kind of agree that fork might not be an ideal mechanism to create a new process, and I believe if we redesign Unix, fork would be replaced by something else. But the system call is there for 50 years and will stay here until Unix dies out.

from mold.

matu3ba avatar matu3ba commented on July 18, 2024

It basically suggests to deprecate fork and choose either posix_spawn() on any POSIX-compliant operating system or CreateProcess() on Windows.

posix_spawn has the same class of issues: ziglang/zig@22690ef, explained here golang/go#22315
with these necessary hacks workarounds: pantsbuild/pants#10507

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.