Coder Social home page Coder Social logo

Comments (7)

rui314 avatar rui314 commented on July 18, 2024 1

I'm closing this issue as it seems to have been resolved.

from mold.

rui314 avatar rui314 commented on July 18, 2024

Please try to rename mold in the same directory instead of moving to somewhere else, just like this:

$ make
$ mv mold mold2
$ ./mold2 -run make

Then, verify that your mold is built with mold by running readelf -p mold.

from mold.

quadroli avatar quadroli commented on July 18, 2024

well, yes, mold is successfully linked using mold:

[ 0] GCC: (Ubuntu 10.2.0-5ubuntu1~20.04) 10.2.0
[ 2b] clang version 10.0.0-4ubuntu1
[ 4b] mold a02fc7edb64b3fe7a58360123fab1ed3069b42f3

But by default the applications i compile are not
[ 0] GCC: (Ubuntu 9.3.0-17ubuntu1~20.04) 9.3.0

from mold.

rui314 avatar rui314 commented on July 18, 2024

What is your application?

from mold.

quadroli avatar quadroli commented on July 18, 2024

Oh, just a simple hello world, one file

Hmmm, same deal with multiple files to having run
cc file1 file2 -o output

from mold.

rui314 avatar rui314 commented on July 18, 2024

You have to tell cc to use mold as a linker. One way of doing it is adding -fuse-ld=<absolute-path-to-mold> to cc (if it doesn't work with your cc, try clang instead of cc). The other way is to run your cc as a subcommand of mold, as shown below

path/to/mold -run cc file1 file2 -o output

from mold.

quadroli avatar quadroli commented on July 18, 2024

Ohh, alright, sorry i got the impression that by running that
(/mold -run make) it would automatically replace ld

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.