Skip to content

Conversation

Bobo1239
Copy link
Contributor

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

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

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label May 25, 2021
@ojeda
Copy link
Contributor

ojeda commented May 25, 2021

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.

@mpe may know.

@mpe
Copy link

mpe commented May 26, 2021

I'm not a toolchain expert, I'll see if I can get the attention of one.

@mpe
Copy link

mpe commented May 28, 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.

@nagisa
Copy link
Member

nagisa commented May 28, 2021

@bors r+

@bors
Copy link
Collaborator

bors commented May 28, 2021

📌 Commit 4a76934 has been approved by nagisa

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels May 28, 2021
@bors
Copy link
Collaborator

bors commented May 28, 2021

⌛ Testing commit 4a76934 with merge 6f9df55...

@bors
Copy link
Collaborator

bors commented May 28, 2021

☀️ Test successful - checks-actions
Approved by: nagisa
Pushing 6f9df55 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label May 28, 2021
@bors bors merged commit 6f9df55 into rust-lang:master May 28, 2021
@rustbot rustbot added this to the 1.54.0 milestone May 28, 2021
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merged-by-bors This PR was explicitly merged by bors. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants