about summary refs log tree commit diff
path: root/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2021-05-28 15:03:52 +0000
committerbors <bors@rust-lang.org>2021-05-28 15:03:52 +0000
commit6f9df55a782c5373c75dfa23e6ba50f8b42318ef (patch)
tree6bd6e3ebc2dc34ae95699d2b2ae73757c7a1a115 /compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp
parentce0d64e03ef9875e0935bb60e989542b7ec29579 (diff)
parent4a76934aa7e46acad5f150ff394601c0b6d6d53f (diff)
downloadrust-6f9df55a782c5373c75dfa23e6ba50f8b42318ef.tar.gz
rust-6f9df55a782c5373c75dfa23e6ba50f8b42318ef.zip
Auto merge of #85700 - Bobo1239:dso_local_ppc64, r=nagisa
Fix static relocation model for PowerPC64

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

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](https://github.com/Rust-for-Linux/linux) runs again on ppc64le. (instead of [getting loaded successfully but crashing](https://github.com/Bobo1239/linux/runs/2646478783?check_suite_focus=true#step:47:358))

r? `@nagisa`
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp')
0 files changed, 0 insertions, 0 deletions