Closed user202729 closed 1 week ago
What is your mold version? I tried that on Ubuntu 20.04 and Ubuntu 24.04 in Docker, and I couldn't see the difference (e.g. 2.287s vs. 0m2.169s.)
@rui314 Latest master (at the time of reporting).
Any idea how might I debug it? (I try running gdb under perf record to make a flamegraph maybe?)
My g++ version is 11.4.0 and gdb version is 12.1, I'm using Ubuntu 22.4. But you tried it on both surrounding Ubuntu versions and can't reproduce it...
Strangely enough, the issue is no longer reproducible for me.
Guess I'll close it for now.
To reproduce:
assume
ld
is symlinked tomold
somewherecompile gcc
try to debug
cc1plus
as followssee that it takes ≈ 9 seconds
now unlink
ld
(it should point to GNU ld)recompile
(will take 15 second to link, unlike mold which only take 1 second)
rerun
now it only take 3 second
Any idea why? (could also be gdb's fault though)
Searching on gdb's bug database, there is https://sourceware.org/bugzilla/show_bug.cgi?id=30008 which talks about gdb being unable to read gdb_index generated by mold (the issue is still open). i