-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Fix static relocation model for PowerPC64 #85700
Conversation
@mpe may know. |
I'm not a toolchain expert, I'll see if I can get the attention of one. |
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
@bors r+ |
📌 Commit 4a76934 has been approved by |
☀️ Test successful - checks-actions |
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>
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>
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>
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>
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