gold linker and -fsplit-stack sometimes gives error

Khanh Trinh tnkhanh4@gmail.com
Thu Apr 15 09:59:08 GMT 2021


Hi,
I tried to run "gcc test.c -fuse-ld=gold -fsplit-stack" on Ubuntu and it
gives me error:
"/usr/bin/ld.gold: error: /tmp/ccUYHXaK.o: failed to match split-stack
sequence at section 1 offset 0
collect2: error: ld returned 1 exit status"

However, it runs fine on godbolt https://godbolt.org/z/5K3sxbd7h

It also runs fine without -fuse-linker=gold on my machine, meaning the
default linker works.
It also runs fine on my Debian..

I'm not sure it's gold's fault. Is it? What is going on? How can I fix this?

Thanks,
Khanh


More information about the Binutils mailing list