-
Notifications
You must be signed in to change notification settings - Fork 13.6k
[LLD] Undefined symbol __gxx_personality_v0
when linking with lld
#54701
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
@llvm/issue-subscribers-lld-elf |
Usage error. You need to link with
I cannot reproduce.
If that happens, it may be a bug in GNU ld. |
I believe this should be considered a bug. |
https://maskray.me/blog/2020-12-19-lld-and-gnu-linker-incompatibilities See the first few paragraphs around "Piotr Kubaj said that this is a probably more of a marketing term than a technical term, the term tries to lure existing users into thinking "it's the same you know, but better!". " As I mentioned, clang -fuse-ld=bfd failed for me. The case that it does not fail for you may be a bug, or could be a Ubuntu specific bug. This is not such a widespread thing that we should seek for bug-for-bug compatibility. |
FWIW I can't reproduce either on Ubuntu18.04 with a recent clang (rebuilt a few days ago), and GNU ld (GNU Binutils for Ubuntu) 2.30 I agree with MaskRay that this is within the tolerances of incompatibilities between linkers, especially as linking with clang++ is the way to get the linker driver to put the right libraries on the command line directly. The only things that I can think of are:
|
Uh oh!
There was an error while loading. Please reload this page.
lld
reports an undefined symbol, whileld
is able to link this without issue:main.c:
foo.cpp:
produces
but removing
-fuse-ld=lld
produces no issues.clang --version
:ld.lld --version
:The text was updated successfully, but these errors were encountered: