Fix static relocation model for PowerPC64#85700
Merged
bors merged 1 commit intorust-lang:masterfrom May 28, 2021
Merged
Conversation
Contributor
@mpe may know. |
|
I'm not a toolchain expert, I'll see if I can get the attention of one. |
nagisa
reviewed
May 26, 2021
nagisa
reviewed
May 26, 2021
|
I couldn't entice anyone to comment directly here. But I did get some feedback, basically saying that use of the TOC is orthogonal to whether the code is being built PIC or not. Because most Power CPUs don't have PC-relative addressing, it's always more efficient to use the TOC to access globals. |
We now also use `should_assume_dso_local()` for declarations and port two additional cases from clang: - Exclude PPC64 [1] - Exclude thread-local variables [2] [1]: https://github.com/llvm/llvm-project/blob/033138ea452f5f493fb5095e5963419905ad12e1/clang/lib/CodeGen/CodeGenModule.cpp#L1038-L1040 [2]: https://github.com/llvm/llvm-project/blob/033138ea452f5f493fb5095e5963419905ad12e1/clang/lib/CodeGen/CodeGenModule.cpp#L1048-L1050
Member
|
@bors r+ |
Collaborator
|
📌 Commit 4a76934 has been approved by |
Collaborator
Collaborator
|
☀️ Test successful - checks-actions |
Bobo1239
added a commit
to Bobo1239/linux
that referenced
this pull request
May 29, 2021
Includes rust-lang/rust#83592, rust-lang/rust#85276 and rust-lang/rust#85700 which are needed to build correctly again after rustc's upgrade to LLVM 12. Signed-off-by: Boris-Chengbiao Zhou <bobo1239@web.de>
Bobo1239
added a commit
to Bobo1239/linux
that referenced
this pull request
May 29, 2021
Includes rust-lang/rust#83592, rust-lang/rust#85276 and rust-lang/rust#85700 which are needed to build correctly again after rustc's upgrade to LLVM 12. Signed-off-by: Boris-Chengbiao Zhou <bobo1239@web.de>
Bobo1239
added a commit
to Bobo1239/linux
that referenced
this pull request
May 29, 2021
Includes rust-lang/rust#83592, rust-lang/rust#85276 and rust-lang/rust#85700 which are needed to build correctly again after rustc's upgrade to LLVM 12. Also fixes a newly introduced clippy warning. Signed-off-by: Boris-Chengbiao Zhou <bobo1239@web.de>
Bobo1239
added a commit
to Bobo1239/linux
that referenced
this pull request
May 29, 2021
Includes rust-lang/rust#83592, rust-lang/rust#85276 and rust-lang/rust#85700 which are needed to build correctly again after rustc's upgrade to LLVM 12. Signed-off-by: Boris-Chengbiao Zhou <bobo1239@web.de>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
We now also use
should_assume_dso_local()for declarations and port twoadditional cases from clang:
Tbh I don't know enough about PowerPC(64) to explain why the TOC (table of contents; like the GOT in x86?) is still needed even with the static relocation model. But with these changes Rust-For-Linux runs again on ppc64le. (instead of getting loaded successfully but crashing)
r? @nagisa