-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Fixed linking error with gold #1579
Conversation
I think the error was due to the linker option To be specific, with |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
Unit testing passed. |
Unit testing passed. |
Awesome |
When using gold as the linker, building fails with undefined referenced symbols. As for the the reason underhood, I will dig it later. I think the error was due to the linker option --gc-sections, which is enabled with ld.bfd, mostly the default one, while disabled with ld.gold. To be specific, with --gc-sections, some unused functions are eliminated during the link stage(this is one of several ways I reduce the build size), as well as their dependencies. At the meantime, --gc-sections is disabled when gold linker is used, since it's buggy when they are used together(something tedious on use of systemtap by folly, ignore it if no interest, consult me otherwise).
When using gold as the linker, building fails with undefined referenced symbols. As for the the reason underhood, I will dig it later.