Announcement

Collapse
No announcement yet.

GCC 12 Adds Support For Using The Mold Linker

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • kiffmet
    replied
    Does the use of different linkers influence the performance of the resulting binary when not using LTO?

    Leave a comment:


  • tuxd3v
    replied
    This tests of speed are a little subjective, and to do a honest test, it would take quite a lot of work..
    The linker also has dependencies...at runtime.

    Depending on the distribution some library dependencies could be compiled statically, and so the linker will be faster to launch, since it has less dynamic linker activities to be done, and that will of-course influence the speed..

    In my case, I have small linker binaries, which means tons of shared libraries to link, when the linker runs(so will be slower, but uses less space in disk..):
    Code:
    $ ls -lhH /usr/bin/ld.*
    -rwxr-xr-x 1 root root 1,7M fev 20 2021 /usr/bin/ld.bfd
    -rwxr-xr-x 1 root root 2,2M fev 20 2021 /usr/bin/ld.gold

    Leave a comment:


  • ptr1337
    replied
    Originally posted by atomsymbol

    Code:
    $ ls -hlL /usr/bin/ld.*
    -rwxr-xr-x 2 root root 4.3M Sep 21 17:22 /usr/bin/ld.bfd
    -rwxr-xr-x 1 root root 12M Sep 21 17:22 /usr/bin/ld.gold
    -rwxr-xr-x 1 root root 65k Nov 6 15:48 /usr/bin/ld.lld
    -rwxr-xr-x 1 root root 9.5M Dec 20 21:08 /usr/bin/ld.mold
    
    $ ld.bfd --version
    GNU ld 2.37
    
    $ ld.gold --version
    GNU gold 1.16
    Interesting your size difference.
    Code:
    [FONT=monospace][COLOR=#b218b2]❯[/COLOR][COLOR=#000000] [/COLOR][COLOR=#005fd7]ls[/COLOR][COLOR=#000000] [/COLOR][COLOR=#00afff]-hlL[/COLOR][COLOR=#000000] [/COLOR][COLOR=#00afff]/usr/bin/ld.[/COLOR][COLOR=#00a6b2]*[/COLOR][COLOR=#000000] [/COLOR]
    -rwxr-xr-x 2 root root 2.8M Dec 28 19:04 [COLOR=#54ff54][B]/usr/bin/ld.bfd[/B][/COLOR][COLOR=#000000] [/COLOR]
    -rwxr-xr-x 1 root root 3.8M Dec 28 19:04 [COLOR=#54ff54][B]/usr/bin/ld.gold[/B][/COLOR][COLOR=#000000] [/COLOR]
    -rwxr-xr-x 1 root root 5.8M Dec 28 19:48 [COLOR=#54ff54][B]/usr/bin/ld.lld[/B][/COLOR][COLOR=#000000] [/COLOR]
    -rwxr-xr-x 1 root root 3.6M Dec 29 19:59 [COLOR=#54ff54][B]/usr/bin/ld.mold[/B][/COLOR][/FONT]

    Leave a comment:


  • brad0
    replied
    Originally posted by tildearrow View Post
    Question, is GNU ld the same thing as Gold?
    No. GNU ld AKA the BFD linker AKA ld.bfd is different from the Gold linker AKA ld.gold. An operating system typically has an ld symlink to the linker (.e.g. ld.bfd, ld.gold, ld.lld. ld.mold, etc.)

    Leave a comment:


  • tildearrow
    replied
    Question, is GNU ld the same thing as Gold?

    Leave a comment:


  • ptr1337
    replied
    But first declining the patch ... But yeah, its good that it got merged.

    Leave a comment:


  • phoronix
    started a topic GCC 12 Adds Support For Using The Mold Linker

    GCC 12 Adds Support For Using The Mold Linker

    Phoronix: GCC 12 Adds Support For Using The Mold Linker

    A small but noteworthy change that landed today for the GCC 12 compiler itself is support for using the Mold linker...

    Phoronix, Linux Hardware Reviews, Linux hardware benchmarks, Linux server benchmarks, Linux benchmarking, Desktop Linux, Linux performance, Open Source graphics, Linux How To, Ubuntu benchmarks, Ubuntu hardware, Phoronix Test Suite
Working...
X