Skip to content

Add pie as another relocation-model value - #88820

Merged
bors merged 1 commit into
rust-lang:masterfrom
hlopko:add_pie_relocation_model
Oct 1, 2021
Merged

Add pie as another relocation-model value#88820
bors merged 1 commit into
rust-lang:masterfrom
hlopko:add_pie_relocation_model

Conversation

@hlopko

Copy link
Copy Markdown
Contributor

@rust-highfive

Copy link
Copy Markdown
Contributor

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @wesleywiser (or someone else) soon.

Please see the contribution instructions for more information.

@rust-highfive

Copy link
Copy Markdown
Contributor

⚠️Warning⚠️

@rust-highfiverust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Sep 10, 2021
@rust-log-analyzer

This comment has been minimized.

@hlopko

hlopko commented Sep 10, 2021

Copy link
Copy Markdown
ContributorAuthor

And I discovered a bug already - external functions should not be marked dso_local. I will add a fix and a test.

@hlopko
hlopkoforce-pushed the add_pie_relocation_model branch from 2954c0b to 23dd820CompareSeptember 10, 2021 16:09
@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@apirainoapiraino added the T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. label Sep 13, 2021
Comment threadsrc/doc/rustc/src/codegen-options/index.md Outdated
@wesleywiser

Copy link
Copy Markdown
Member

r? @petrochenkov or @tmandry

Comment threadsrc/doc/rustc/src/codegen-options/index.md Outdated
Comment threadsrc/doc/rustc/src/codegen-options/index.md Outdated
Comment threadcompiler/rustc_codegen_llvm/src/back/write.rs Outdated
Comment threadcompiler/rustc_codegen_llvm/src/context.rs Outdated
@petrochenkovpetrochenkov removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Sep 22, 2021
@petrochenkov

Copy link
Copy Markdown
Contributor

Also fn link_output_kind needs to be updated to treat pie in the same way as pic.

@petrochenkovpetrochenkov added the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label Sep 22, 2021
@rust-log-analyzer

This comment has been minimized.

@petrochenkov

Copy link
Copy Markdown
Contributor

r=me with commits squashed.

@hlopko

Copy link
Copy Markdown
ContributorAuthor

(ftr, I believe I addressed all the comments, maybe I need to comment so bors continues with the r= command?)

@bjorn3

Copy link
Copy Markdown
Member

The comments haven't been squashed into a single commit yet. Once that is done someone with review permission will need to tell bors to merge this PR.

@hlopko

Copy link
Copy Markdown
ContributorAuthor

@bjorn3 are you saying that I should squash the commits? Or bors is going to do that?

@bjorn3

Copy link
Copy Markdown
Member

You need to squash. Bors doesn't.

@hlopko
hlopkoforce-pushed the add_pie_relocation_model branch from ff7d253 to d033e9bCompareSeptember 27, 2021 07:52
@hlopko

Copy link
Copy Markdown
ContributorAuthor

I see, thank you! Done.

@bjorn3

Copy link
Copy Markdown
Member

@bors r=petrochenkov

@bors

bors commented Sep 27, 2021

Copy link
Copy Markdown
Collaborator

📌 Commit d033e9b2c8d0eff1a49f4283f5c623c9503cdf10 has been approved by petrochenkov

@hlopko

Copy link
Copy Markdown
ContributorAuthor

@bors r=petrochenkov

@bors

bors commented Sep 28, 2021

Copy link
Copy Markdown
Collaborator

@hlopko: 🔑 Insufficient privileges: Not in reviewers

@hlopko

Copy link
Copy Markdown
ContributorAuthor

Had to try :)

@petrochenkov

Copy link
Copy Markdown
Contributor

@bors r+

@bors

bors commented Sep 28, 2021

Copy link
Copy Markdown
Collaborator

📌 Commit dea3ee1 has been approved by petrochenkov

@borsbors 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-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Sep 28, 2021
Manishearth added a commit to Manishearth/rust that referenced this pull request Sep 30, 2021
…petrochenkov
Add `pie` as another `relocation-model` value
MCP: rust-lang/compiler-team#461
Manishearth added a commit to Manishearth/rust that referenced this pull request Sep 30, 2021
…petrochenkov
Add `pie` as another `relocation-model` value
MCP: rust-lang/compiler-team#461
@Manishearth

Copy link
Copy Markdown
Member

Failed in #89411 (comment) on x86_64-apple

@bors r-

---- [codegen] codegen/pie-relocation-model.rs stdout ----
error: verification with 'FileCheck' failed
status: exit status: 1
command: "/Users/runner/work/rust/rust/build/x86_64-apple-darwin/llvm/build/bin/FileCheck" "--input-file" "/Users/runner/work/rust/rust/build/x86_64-apple-darwin/test/codegen/pie-relocation-model/pie-relocation-model.ll" "/Users/runner/work/rust/rust/src/test/codegen/pie-relocation-model.rs" "--allow-unused-prefixes" "--check-prefixes" "CHECK,NONMSVC"
stdout:
------------------------------------------
------------------------------------------
stderr:
------------------------------------------
/Users/runner/work/rust/rust/src/test/codegen/pie-relocation-model.rs:7:11: error: CHECK: expected string not found in input
// CHECK: define dso_local i8 @call_foreign_fn()
^
/Users/runner/work/rust/rust/build/x86_64-apple-darwin/test/codegen/pie-relocation-model/pie-relocation-model.ll:1:1: note: scanning from here
; ModuleID = 'pie_relocation_model.8d7ed54a-cgu.0'
^
/Users/runner/work/rust/rust/build/x86_64-apple-darwin/test/codegen/pie-relocation-model/pie-relocation-model.ll:9:10: note: possible intended match here
%0 = tail call zeroext i8 @foreign_fn()
^
Input file: /Users/runner/work/rust/rust/build/x86_64-apple-darwin/test/codegen/pie-relocation-model/pie-relocation-model.ll
Check file: /Users/runner/work/rust/rust/src/test/codegen/pie-relocation-model.rs
-dump-input=help explains the following input dump.
Input was:
<<<<<<
1: ; ModuleID = 'pie_relocation_model.8d7ed54a-cgu.0' check:7'0 X~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ error: no match found
2: source_filename = "pie_relocation_model.8d7ed54a-cgu.0" check:7'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3: target datalayout = "e-m:o-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" check:7'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
4: target triple = "x86_64-apple-macosx10.8.0" check:7'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
5: check:7'0 ~
6: ; Function Attrs: uwtable check:7'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~
7: define i8 @call_foreign_fn() unnamed_addr #0 { check:7'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
8: start: check:7'0 ~~~~~~~
9: %0 = tail call zeroext i8 @foreign_fn() check:7'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
check:7'1 ? possible intended match
10: ret i8 %0 check:7'0 ~~~~~~~~~~~
11: } check:7'0 ~~
12: check:7'0 ~
13: ; Function Attrs: uwtable check:7'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~
14: declare zeroext i8 @foreign_fn() unnamed_addr #0 check:7'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.
.
.
>>>>>>
------------------------------------------
failures:
[codegen] codegen/pie-relocation-model.rs

@borsbors added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Oct 1, 2021
@hlopko
hlopkoforce-pushed the add_pie_relocation_model branch from dea3ee1 to 198d907CompareOctober 1, 2021 06:06
@hlopko

Copy link
Copy Markdown
ContributorAuthor

Restricted the codegen test only to x86_64 linux, the test doesn't make sense on mac as functions are (almost?) never marked dso_local there. And I don't know of PIE makes any sense for Windows.

@petrochenkov

Copy link
Copy Markdown
Contributor

@bors r+

@bors

bors commented Oct 1, 2021

Copy link
Copy Markdown
Collaborator

📌 Commit 198d907 has been approved by petrochenkov

@borsbors 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-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Oct 1, 2021
fee1-dead added a commit to fee1-dead-contrib/rust that referenced this pull request Oct 1, 2021
…petrochenkov
Add `pie` as another `relocation-model` value
MCP: rust-lang/compiler-team#461
@fee1-deadfee1-dead mentioned this pull request Oct 1, 2021
@ManishearthManishearth mentioned this pull request Oct 1, 2021
bors added a commit to rust-lang-ci/rust that referenced this pull request Oct 1, 2021
…arth
Rollup of 6 pull requests
Successful merges:
- rust-lang#87868 (Added -Z randomize-layout flag)
- rust-lang#88820 (Add `pie` as another `relocation-model` value)
- rust-lang#89029 (feat(rustc_parse): recover from pre-RFC-2000 const generics syntax)
- rust-lang#89322 (Reapply "Remove optimization_fuel_crate from Session")
- rust-lang#89340 (Improve error message for `printf`-style format strings)
- rust-lang#89415 (Correct caller/callsite confusion in inliner message)
Failed merges:
r? `@ghost`
`@rustbot` modify labels: rollup
@bors
bors merged commit 6f1e930 into rust-lang:masterOct 1, 2021
@rustbotrustbot added this to the 1.57.0 milestone Oct 1, 2021
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-borsStatus: Waiting on bors to run and complete tests. Bors will change the label on completion.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

10 participants

@hlopko@rust-highfive@rust-log-analyzer@wesleywiser@petrochenkov@bjorn3@bors@Manishearth@apiraino@rustbot