-
Notifications
You must be signed in to change notification settings - Fork 169
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
Remove weak symbols, use abort
for defaults.
#254
base: master
Are you sure you want to change the base?
Conversation
I think there may be something else that I need to do to the linker script, since as it is now it currently fails to build on one of the projects I'm working on with the error
|
Try to rebase from |
@rslawson please, add a brief note in |
Yep, they did disappear. I'll make the change to |
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.
I would like to discuss this work with @rust-embedded/all in the next meeting in case there is a better approach to deal with weak symbols and LTO optimizations in Rust.
afb8517
to
aa8cff9
Compare
In the meantime I'll try to keep this rebased with an up-to-date master branch from this repo. |
We discussed this today and... we didn't come up with a better solution. Let's leave this PR and #247 open to keep discussing what to do with weak symbols. We must:
@rslawson , would you be happy to keep working on this PR until we decide what to do with the remaining weak symbols? |
Sure thing, I can do that. |
Is this only a problem with Maybe until there is a stable solution for weak linkage in Rust, we could recommend using a different linker instead of introducing nightly-only features? |
As per #247, using weak symbols for overridable functions has proven problematic with
lto = true
. This is a partial reversion of that, though there are still other functions this may yet be done with. There is also another solution to be done as a sort of nightly-only thing with naked functions and#[linkage = "weak"]
, however I have opted not to go with that seeing as this project doesn't currently require nightly and I don't think this is an issue worth changing that over.